C++ COURSE

C++ Inheritance

Learn C++ programming with EDUHUB Code Hub.

C++ Inheritance

Inheritance allows one class to use properties and functions of another class.



class Animal{


public:

void eat(){

cout << "Eating";

}

};



class Dog : public Animal{


};