Accessing Inherited Functions

  • + 2 comments

    i am trying this........what is wrong here class D :public A,B, C {

    int val;
    public:
        //Initially val is 1
         D()
         {
            val=1;
         }
    
    
         //Implement this function
         void update_val(int new_val)
         {
         while(val!=new_val)
            {
            A::func(val);
            B::func(val);
            C::func(val);
             }   
          }
    
         //For Checking Purpose
         void check(int); //Do not delete this line.
    

    };