Inheritance in C++
What is Inheritance?
Inheritance allows one class to use properties of another class.
Example
class Parent {
public:
void show() {
cout << “Parent class”;
}
};
public:
void show() {
cout << “Parent class”;
}
};
class Child : public Parent {
};
Benefit
Code reuse
