#include<iostream.h>
#include<conio.h>
class parent
{
public:
                void show()
                                {
                                cout<<"Parent Class Show()"<<endl;
                                }
};
class child:public parent
{
public:
                void show()
                                {
                                cout<<"Child Class Show()"<<endl;
                                }
};
void main()
{
                clrscr();
                child c;
                c.show();
                parent p;
                p.show();
                c.parent::show();
                getch();
}

197

Advertisements