It would help if you indent your code properly and explained how does the relevant code not work. A simple and short program that we can compile and run, with the expected output and your actual output, would be excellent.

Quote Originally Posted by tuli
The "official" copy-constructor wont work (as far as i see, it calls B's default constructor instead).
You are aware that you can invoke the base class copy constructor in the initialisation list of the copy constructor of a derived class, right?

Furthermore, it is more conventional to implement the copy assignment operator using the copy constructor (and maybe the destructor and a swap function) rather than implement the copy constructor using the copy assignment operator.