Initializating animal when copying
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Animal.cpp :+: :+: :+: */
|
||||
/* WrongCat.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/06 02:27:27 by aortigos #+# #+# */
|
||||
/* Updated: 2025/09/06 02:28:09 by aortigos ### ########.fr */
|
||||
/* Created: 2025/11/21 11:38:27 by aortigos #+# #+# */
|
||||
/* Updated: 2025/11/21 11:38:49 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -23,7 +23,7 @@ WrongCat::~WrongCat()
|
||||
std::cout << "Cat has been destroyed" << std::endl;
|
||||
}
|
||||
|
||||
WrongCat::WrongCat(const WrongCat &other)
|
||||
WrongCat::WrongCat(const WrongCat &other) : WrongAnimal(other)
|
||||
{
|
||||
std::cout << "WrongCat copied" << std::endl;
|
||||
*this = other;
|
||||
|
||||
Reference in New Issue
Block a user