RUPAK SEARCH ENGINE

Custom Search

example of constructor in derived class

example of constructor in derived class

# include
# include
using namespace std;

class base
{
//body
};

class derived:public base
{
//body of derived class
public:
derived()
{
cout<<"\nI am no argument derived class constructor";
}
};

int main()
{
derived d;
getch();
return 0;
}

No comments:

Post a Comment