How can a subclass call a superclass method with the same subclass method name?

#include <iostream> using namespace std; class Person { public: void sing(); }; class Child : public Person { public: void sing(); }; Person::sing() { cout << "Raindrops keep falling on my head..." << endl; } Child::sing() { cout << "London bridge is falling down..." << endl; } int main() { Child suzie; suzie.sing(); // I want to know how I can call the Person method of sing here! return 0; } 
+4
source share
2 answers
 suzie.Person::sing(); 
+15
source

A child can use Person :: sign ().

For a good explanation, see http://bobobobo.wordpress.com/2009/05/20/equivalent-of-keyword-base-in-c/ .

+2
source

All Articles