We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
class D : public A, public B, public C
{
int val;
public:
//Initially val is 1
D()
{
val = 1;
}
//Implement this function
void update_val(int new_val)
{
while (new_val > val) {
if((new_val /val) % 2 == 0){
A::func(val);
continue;
}
Accessing Inherited Functions
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; } //Implement this function void update_val(int new_val) {
while (new_val > val) { if((new_val /val) % 2 == 0){ A::func(val); continue; }
};