Back To C++ Inheritance Index
add theory here
//program to demonstrate single level inheritance, class is derived from base class through private access mode #include
#include
class employee { int ecode; char ename[20]; public: void egetdata() { cout<<"\nenter employee code "; cin>>ecode; cout<<"\nenter employee name "; cin>>ename; } void eshowdata() { cout<<"\nemployee code is "<
>title; } void mshowdata() { eshowdata(); cout<<"\ntitle of manager is "<