cpp/CPP04/ex02/WrongCat.cpp
2024-12-04 17:29:31 +01:00

26 lines
470 B
C++

#include "WrongCat.hpp"
WrongCat::WrongCat() {
std::cout << "WrongCat born" << std::endl;
this->type = "WrongCat";
}
WrongCat::WrongCat(const WrongCat &other) : WrongAnimal() {
*this = other;
}
WrongCat& WrongCat::operator=(const WrongCat &other) {
if (this != &other) {
this->type = other.type;
}
return (*this);
}
WrongCat::~WrongCat() {
std::cout << "WrongCat die" << std::endl;
}
void WrongCat::makeSound() const {
std::cout << "Meuh" << std::endl;
}