0
what is constructor
give example with details
2 Antworten
+ 2
class qae
{
qae()
{
cout<<"constructor"<<endl;
}
};
void main()
{
qae b();
}
output:
constructor
+ 1
Constructor is automatically called when new object is created. Its name is same to class name.