1
0

」 feat(Ex00): added a very cool feature !

This commit is contained in:
2024-12-01 20:24:38 +01:00
parent 467c3be3c3
commit c22dad6f83
15 changed files with 333 additions and 0 deletions

38
ex00/cat.cpp Normal file
View File

@ -0,0 +1,38 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* cat.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/01 19:49:11 by adjoly #+# #+# */
/* Updated: 2024/12/01 20:18:55 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "cat.hpp"
Cat::Cat(void) : Animal("Cat"){
log("", "Cat", "", "construtor called");
}
Cat::~Cat(void) {
log("", "Cat", "", "destructor called");
}
Cat::Cat(const Cat &cpy) : Animal("Cat"){
log("", "Cat", _type, "copy construtor called");
*this = cpy;
}
Cat &Cat::operator=(const Cat &cpy) {
log("🟰", "Cat", "", "copy assignment construtor called");
if (this != &cpy) {
this->_type = cpy._type;
}
return (*this);
}
void Cat::makeSound(void) const {
log("🔊", "Cat", "", "Mmmmmmeeeeeeeeoooooooowwwwww");
}