#include
Using namespace std;
Class A
{
Void fun1 ()
{
FUN2 ();
}
Virtual void fun2 ()
{
COUT << "FUN2 in Class A";
}
}
Class B: Public Class A
{
Virtual void fun2 ()
{
COUT << "Fun2 in classb";
}
}
void main ()
{
B m_example;
m_example.fun1 ();
}
Screen output: fun2 in classb