Fixed headers and copy constructor

This commit is contained in:
2025-11-21 12:18:32 +01:00
parent d4d8891a6b
commit c624ced97f
12 changed files with 32 additions and 36 deletions

View File

@@ -28,8 +28,7 @@ Cat::~Cat()
Cat::Cat(const Cat &other) : Animal(other)
{
std::cout << "Cat copied" << std::endl;
this->brain = NULL;
*this = other;
this->brain = new Brain(*other.brain);
}
Cat& Cat::operator=(const Cat &other)