Original Post
A very basic question. Sorry I graduated from school for too long. I have a class A with lots of private data members. Class B is derived from class A, and has its own private data members. Now I have an object of A (OA), and an object of B (OB) as well. I want to copy the values of all variables from OA to OB, can I use the following line to finish the task? OB = OA; If I want to copy the values of those common variables from OB to OA, can I use the following line? OA = (Class A) (OB); BTW, I am using Visual Studio 2003. Thank you in advance. Johnson