26 lines
470 B
C++
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;
|
|
}
|