Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Write a C++ Program using concept of single Inheritance.
SUBMITTED BY:
Nrupeshsinh
DATE:
June 30, 2016, 2:27 p.m.
FORMAT:
Text only
SIZE:
322 Bytes
Raw
Download
Tweet
HITS:
369
Go to comments
Report
# include<iostream.h>
# include<conio.h>
class A
{
public:
void show()
{
cout<<"We are in base class."<<endl;
}
};
class B : public A
{
public:
void display()
{
cout<<"We are in derived class.";
}
};
void main()
{
clrscr();
B obj;
obj.show();
obj.display();
getch();
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus