# include
# include
using namespace std;
class base
{
public:
base (int data)
{
cout<<"\nI am from one argument base class constructor";
}
};
class derived:public base
{
public:
derived(int data):base(data)
{
cout<<"\nI am one constructor derived class constructor";
}
};
int main()
{
derived d(5);
getch();
return 0;
}
No comments:
Post a Comment