print out address of object to copy in copy constructor

This commit is contained in:
neingeist 2014-04-19 11:14:21 +02:00
parent 235d604757
commit 66d0728e00

View file

@ -7,7 +7,7 @@ class Animal {
std::cout << "constructor" << std::endl;
}
Animal(const Animal& other) {
std::cout << "copy constructor" << std::endl;
std::cout << "copy constructor (" << &other << ")" << std::endl;
}
// Note: using *virtual* does the difference here!