CPP01 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Zombie.cpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Zombie.cpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/14 20:45:02 by kamitsui #+# #+# */
9/* Updated: 2025/04/25 23:41:27 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
18#include "Zombie.hpp"
19
25Zombie::Zombie() : name("default") { std::cout << "Zombie " << name << " created (default)." << std::endl; };
26
34Zombie::Zombie(std::string name) : name(name) { std::cout << "Zombie " << name << " created." << std::endl; };
35
41Zombie::~Zombie() { std::cout << "Zombie " << this->name << " destroyed." << std::endl; }
42
48void Zombie::announce(void) { std::cout << this->name << ": BraiiiiiiinnnzzzZ..." << std::endl; }
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
ostream cout
void announce(void)
Announces the zombie.
Definition Zombie.cpp:48
Zombie()
Default constructor for the Zombie class.
Definition Zombie.cpp:25
~Zombie()
Destructor for the Zombie class.
Definition Zombie.cpp:41
Declares the Zombie class and the zombieHorde function.