48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* WrongCat.cpp :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/11/21 11:38:27 by aortigos #+# #+# */
|
|
/* Updated: 2025/11/21 11:40:44 by aortigos ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "WrongCat.hpp"
|
|
|
|
WrongCat::WrongCat() : WrongAnimal()
|
|
{
|
|
std::cout << "WrongCat has been created" << std::endl;
|
|
this->type = "WrongCat";
|
|
}
|
|
|
|
WrongCat::~WrongCat()
|
|
{
|
|
std::cout << "WrongCat has been destroyed" << std::endl;
|
|
}
|
|
|
|
WrongCat::WrongCat(const WrongCat &other) : WrongAnimal(other)
|
|
{
|
|
std::cout << "WrongCat copied" << std::endl;
|
|
*this = other;
|
|
}
|
|
|
|
WrongCat& WrongCat::operator=(const WrongCat &other)
|
|
{
|
|
std::cout << "WrongCat copy assignment called" << std::endl;
|
|
if (this != &other)
|
|
this->type = other.type;
|
|
return (*this);
|
|
}
|
|
|
|
void WrongCat::makeSound() const
|
|
{
|
|
std::cout << "WrongCat weird sounds..." << std::endl;
|
|
}
|
|
|
|
std::string WrongCat::getType() const
|
|
{
|
|
return (this->type);
|
|
} |