CPP01 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Zombie.hpp
[詳解]
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* Zombie.hpp :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2025/04/14 20:25:40 by kamitsui #+# #+# */
9/* Updated: 2025/04/25 23:39:08 by kamitsui ### ########.fr */
10/* */
11/* ************************************************************************** */
12
18#ifndef ZOMBIE_HPP
19#define ZOMBIE_HPP
20
21#include <cstdlib>
22#include <iostream>
23#include <string>
24
30class Zombie {
31 private:
32 std::string name;
33
34 public:
38 Zombie();
39
43 Zombie(std::string name);
44
48 ~Zombie();
49
53 void announce(void);
54};
55
63
69void randomChump(std::string name);
70
71#endif
Represents a Zombie.
Definition Zombie.hpp:30
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
Zombie * newZombie(std::string name)
Creates a new Zombie on the heap.
Definition newZombie.cpp:29
void randomChump(std::string name)
Creates a Zombie on the stack and makes it announce itself.