overriding tag

2 questions


1 answers
97 views
0
C++ Overriding, Polymorphism

Hello.The code I'm trying to do,class Shape { protected: int type; // POINT, CIRCLE, RECTANGLE, or TRIANGLE public: virtual double area()=0; virtual bool isContaining(const Point&)=0; enum {...


1 answers
101 views
0
To call the virtual function of the parent class

In Bar, Foo's virtual void printStuff is overrideI'd like to sing printStuff() of Foo.In Java, we could've used super.printStuff() togetherHow do I use it in C++?class Foo{public: int x; virtual void ...


© 2024 OneMinuteCode. All rights reserved.