xxxxxxxxxx
// use the parent's constructor while passing variable
// if you don't want to pass variable delete the cA(num) part and the getting parameters from cB
class cA{
public:
cA(int num){
}
};
class cB: public cA{
public cB(int num): cA(num){
}
};
xxxxxxxxxx
class left {
public:
void foo();
};
class right {
public:
void foo();
};
class bottom : public left, public right {
public:
void foo()
{
//base::foo();// ambiguous
left::foo();
right::foo();
// and when foo() is not called for 'this':
bottom b;
b.left::foo(); // calls b.foo() from 'left'
b.right::foo(); // call b.foo() from 'right'
}
};