Calling The Base Class Method Inside The Derived Class overrided Method

I have a class called Object which declares and defines a virtual method toString();

another class MyClass inherits from class Object and overrides the method
toString()

in its defination, of the method MyClass::toString() i want to call the Object method Object::toString()

viz:
1
2
3
4
String MyClass::toString(){
   //call Object implementation
   return Object::toString();
}


is the way i do it right? or how can i do it?
Yes, that is correct.
Thanks men. I thought it could throw some errors
FYI, this isn't overriding the function, it is hiding it.
Topic archived. No new replies allowed.