RUPAK SEARCH ENGINE

Custom Search

example of constructor in base class

example of constructor in base class

# include
# include
using namespace std;

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

class derived:public base
{
//body of derived class
};

int main()
{
derived d;
getch();
// system("pause");
return 0;
}

No comments:

Post a Comment