#includeiostream using namespace std; class Test1 { public: virtual void show() { cout"Hello from Test1"endl; } }; class Test2:public Test1 { public: void show() { cout"Hello from Test2"endl; } }; int main(void) { Test2 obj; obj.show(); return 0; }
Not registered? Create an account
Forgot Password?
Already a registered user? Login