This post contains the c++ example code to understand constructors and inheritance...
#include<iostream.h>
#include<conio.h>
class B
{
};
class D:public B
{
public:
void msg()
{
cout<<"No constructors in base class and derived class"<<endl;
}
};
void main()
{
D objd;
clrscr();
objd.msg();
getch();
}
Hope this helps.
Techytips


October 10, 2011
S A Delphin

Posted in: 
0 comments:
Post a Comment