feat: adding the module01/ex01
This commit is contained in:
parent
07022df125
commit
c7e3b1ab02
6 changed files with 251 additions and 0 deletions
33
cpp01/ex01/Zombie.cpp
Normal file
33
cpp01/ex01/Zombie.cpp
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue