Accessing Inherited Functions

  • + 0 comments

    I tried to extract the multiplication values from classes A, B, and C but in this case, the solution failed so I had to use the manual setting of the multiplication value, and I need to know that values: //int mul_A{1}, mul_B{1}, mul_C{1}; //A::func(mul_A), B::func(mul_B), C::func(mul_C); int mul_A{2}, mul_B{3}, mul_C{5}; while(0 == (new_val % mul_A)) { new_val /= mul_A; A::func(val); } while(0 == (new_val % mul_B)) { new_val /= mul_B; B::func(val); } while(0 == (new_val % mul_C)) { new_val /= mul_C; C::func(val); }