RUPAK SEARCH ENGINE

Custom Search

example of no constructor in base & derived class

example of no constructor in base & derived class

# include
# include
using namespace std;

class base
{
//body
//no constructor
};

class derived:public base
{
//body
//no constructor

public:
void message()
{
cout<<"\nNo constructor in base & derived class";
}
};

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

}

No comments:

Post a Comment