Hi All
We all have read a lot about utility of copy constructor.
I have a simple question .Consider the code below. Is it ok to directly copy one object's content onto other ?
Class A {
......
};
main ()
{
A * obj_1=new A();
// Next the obj_1 variables are initialized
A * obj_2=new A();
//Make a copy of obj_1
*obj_2=*obj_1; ---> Is this OK ?
Thanks
Varun