You are viewing a single comment's thread. Return to all comments →
class D :public A,public B,public C {
int val; public: //Initially val is 1 D() { val = 1; } void update_val(int new_val) { int y=new_val; while(val!=new_val){ while((y%2)==0) { if((val*2)<=new_val) { A::func(val); y=y/2; } } while((y%3)==0) { if((val*3)<=new_val) { B::func(val); } y=y/3; } while((y%5)==0) { if((val*5)<=new_val) { C::func(val); } y=y/5; } } } void check(int);
};
Seems like cookies are disabled on this browser, please enable them to open this website
Accessing Inherited Functions
You are viewing a single comment's thread. Return to all comments →
class D :public A,public B,public C {
};