Overriding Functions

The C++03 way In C++03, the virtual keyword is used to implement function overloading, as shown in the example below: class Shape { public: virtual bool isCircle() { return false; } }; class Circle : public Shape { virtual bool isCircle() { return true; } }; We can test this code as follows: bool test() … Read more