0
what is constructor
give example with details
2 ответов
+ 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.