14 virtual void print() = 0;
24 { std::cout <<
"base class" << std::endl; }
33 { std::cout <<
"child class" << std::endl; }
54 int main(
int argc,
char **argv)
another example of ChildClass (inherits from BaseClass)
void callPrint(AbstractClass &p)
print something
class that inherits from BaseClass -> AbstractClass
class that inherits from AbstractClass
int main(int argc, char **argv)
demonstrate virtual functions and abstract classes
A basic abstract Class (that is inherited from)