Initializating animal when copying
This commit is contained in:
@@ -23,7 +23,7 @@ Cat::~Cat()
|
||||
std::cout << "Cat has been destroyed" << std::endl;
|
||||
}
|
||||
|
||||
Cat::Cat(const Cat &other)
|
||||
Cat::Cat(const Cat &other) : Animal(other)
|
||||
{
|
||||
std::cout << "Cat copied" << std::endl;
|
||||
*this = other;
|
||||
|
||||
Reference in New Issue
Block a user