Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  1.cpp
Language: C/C++
Code:
#include<iostream.h>
#include<conio.h>
class Base
{
public:
virtual void display()
{
cout<<"Base class";
}
};
class Derived:public Base
{
public:
void display()
{
cout<<"Derived class ";
}
};
void main()
{
Base b;
Derived d;
b.display();
d.display();
getch();
}
          
          
Comments: