Fixed headers and copy constructor
This commit is contained in:
@@ -28,8 +28,7 @@ Dog::~Dog()
|
||||
Dog::Dog(const Dog &other) : Animal(other)
|
||||
{
|
||||
std::cout << "Dog copied" << std::endl;
|
||||
this->brain = NULL;
|
||||
*this = other;
|
||||
this->brain = new Brain(*other.brain);
|
||||
}
|
||||
|
||||
Dog& Dog::operator=(const Dog &other)
|
||||
|
||||
Reference in New Issue
Block a user