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

