all is not always what it seems.
I found out the hard way that there is a very big difference between a copy and a direct assignment .
char* a = new char();
char* b = new char();
cin.getline(a,10,'\n');
strcpy(b,a); //ok makes a SEPARATE copy
a=b; //This seems to cause the pointers to use the same memory location.
Is my assessment correct?
also, if b had data in it previously, does this cause a memory leak due to abandonment of the heap area formally pointed to by b? Will the statement delete [] b; recover it even after direct re-assignment?