Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Write a C++ Program using concept of single Inheritance.
SUBMITTED BY:
Nrupeshsinh
DATE:
June 26, 2016, 4:24 a.m.
FORMAT:
C++
SIZE:
318 Bytes
Raw
Download
Tweet
HITS:
484
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