1
0
This repository has been archived on 2025-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
CPP_Module_04/ex02/WrongCat.cpp
2024-12-06 16:24:15 +01:00

39 lines
1.5 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* WrongCat.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/01 19:49:11 by adjoly #+# #+# */
/* Updated: 2024/12/06 15:55:37 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "WrongCat.hpp"
WrongCat::WrongCat(void) : WrongAnimal("WrongCat"){
log("", "WrongCat", "", "construtor called");
}
WrongCat::~WrongCat(void) {
log("", "WrongCat", "", "destructor called");
}
WrongCat::WrongCat(const WrongCat &cpy) : WrongAnimal("WrongCat"){
log("", "WrongCat", _type, "copy construtor called");
*this = cpy;
}
WrongCat &WrongCat::operator=(const WrongCat &cpy) {
log("🟰", "WrongCat", "", "copy assignment construtor called");
if (this != &cpy) {
this->_type = cpy._type;
}
return (*this);
}
void WrongCat::makeSound(void) const {
log("🔊", "WrongCat", "", "wwwwwwwwooooooooeeeeeeeeemmmmmmm");
}