This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // the OOP version in C++ | |
| #include <iostream> | |
| // base abstract class. that is what we use as the interface | |
| class Animal | |
| { | |
| public: | |
| Animal(char const* name): m_name(name) {} | |
| // this is required to properly delete virtual classes |