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:39:27 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
18
#include "
Zombie.hpp
"
19
25
Zombie::Zombie
() : name(
"default"
) {
std::cout
<<
"Zombie "
<< name <<
" created (default)."
<<
std::endl
; };
26
34
Zombie::Zombie
(
std::string
name) : name(name) {
std::cout
<<
"Zombie "
<< name <<
" created."
<<
std::endl
; };
35
41
Zombie::~Zombie
() {
std::cout
<<
"Zombie "
<< this->name <<
" destroyed."
<<
std::endl
; }
42
48
void
Zombie::announce
(
void
) {
std::cout
<< this->name <<
": BraiiiiiiinnnzzzZ..."
<<
std::endl
; }
std::endl
basic_ostream< _CharT, _Traits > & endl(basic_ostream< _CharT, _Traits > &__os)
std::cout
ostream cout
std::basic_string
Zombie::announce
void announce(void)
Announces the zombie.
Definition
Zombie.cpp:48
Zombie::Zombie
Zombie()
Default constructor for the Zombie class.
Definition
Zombie.cpp:25
Zombie::~Zombie
~Zombie()
Destructor for the Zombie class.
Definition
Zombie.cpp:41
Zombie.hpp
Declares the Zombie class and the zombieHorde function.
ex00
Zombie.cpp
構築:
1.9.8