I wondering what happens in the default constructor.
Let me say that I have a class as shown in the code section, why does compiler create a default constructor? and what happens in the default constructor if there is nothing to initialize?
My understanding of constructor is to initialize the member variables of the class. since the class shown below does not have any class members and it is not inherited, I am wondering why the compiler creates the default constructor and what code is placed inside this?
Similarly I want to know about what happens inside the Copyconstructor assignment operator and destructor also. Can please some one explain me this? this was an interview question and i am not getting any proper answers for this.
cout<<"Size of A: "<<sizeof(objA)<<endl;