Attempts To Verify Shallow Copy Operation
Hi!
I am admittedly a novice in using C++ so my question my not be relevant. The program that I was running when I became confused with Mr. Horton's discussion is Ex_09.cpp.
I was trying to verify the claim he made of two variables, (the copied & the copy) pointing to the same address, by outputting both of their addresses using the 'cout' function. All my efforts have resulted in each of the variables having independent addresses.
In so far as this basic notion seems to be one of the primary rationales for implementing dynamic memory allocation and the basis for many of Horton's takeoff point of discussion, including some of the deeper discussions involving Template use for overloading, I feel impelled to really understand the basic issue better, & would appreciate any suggestions that provide clarification.
Newbie' Mike
|