feat: adding the module01/ex01

This commit is contained in:
Raphael 2024-11-04 20:41:49 +01:00
parent 07022df125
commit c7e3b1ab02
6 changed files with 251 additions and 0 deletions

33
cpp01/ex01/Zombie.cpp Normal file
View file

@ -0,0 +1,33 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Zombie.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/04 16:10:21 by rparodi #+# #+# */
/* Updated: 2024/11/04 20:22:57 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "Zombie.hpp"
Zombie::Zombie()
{
//Can't use the default keyword :c
}
Zombie::~Zombie()
{
std::cout << "Zombie's hunter: killed " << _name << std::endl;
}
void Zombie::setName( std::string name )
{
_name = name;
}
void Zombie::announce()
{
std::cout << _name << ": BraiiiiiiinnnzzzZ..." << std::endl;
}