Inheritance - Nathan-Groves/2143-OOP-Groves GitHub Wiki
The gaining of data members and functions from one class to another, useful when making derivative classes that would need the same functions and data members as the parent class.
class Building {
string foundation;
int landArea;
int height;
int occupants;
public:
void printHeight();
};
class Hotel: public Building {
int occupants = 10;
public:
void printOccupants();
};