Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
base and derr con
//g++ 5.4.0 #include <iostream> using namespace std; class base { public:int x; base(int a){x=a; cout<<"base con"<<endl;} ~base(){cout<<"base des"<<endl;} }; class derr {protected: int y; public: derr(int b){y=b;cout<<"derr con"<<endl;} ~derr(){cout<<"derr des"<<endl;} }; class derr2:public base,public derr {int z; public: derr2(int a ,int b, int c):base(b),derr(c) {z=a;cout<<"derr2 con"<<endl;} ~derr2(){cout<<"derr2 des"<<endl;} void show(){cout<<x<<y<<z<<endl;} }; int main() { derr2 ob(1,2,3); ob.show(); return 0; }
run
|
edit
|
history
|
help
0
c++
Callback
4C test
Atul
Vowel_check
LP(Multi)
pangram
VecScalMultiOpLaod
HI
Test 10(2020)