CPP01
1.0
読み取り中…
検索中…
一致する文字列を見つけられません
HumanA.hpp
[詳解]
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* HumanA.hpp :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kamitsui <kamitsui@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2025/04/15 19:42:31 by kamitsui #+# #+# */
9
/* Updated: 2025/04/23 01:42:15 by kamitsui ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
17
#ifndef HUMANA_HPP
18
#define HUMANA_HPP
19
20
#include "
Weapon.hpp
"
21
#include <
string
>
22
26
class
HumanA
{
27
private
:
28
std::string
name;
29
Weapon
&weapon;
30
31
public
:
35
HumanA
(
std::string
name,
Weapon
&weapon);
36
40
~HumanA
();
41
45
void
attack
()
const
;
46
};
47
48
#endif
Weapon.hpp
Declares the Weapon class.
string
std::basic_string
HumanA
Represents a HumanA, who always has a weapon.
Definition
HumanA.hpp:26
HumanA::attack
void attack() const
Makes the HumanA attack.
Definition
HumanA.cpp:43
HumanA::~HumanA
~HumanA()
Destructor for the HumanA class.
Definition
HumanA.cpp:36
Weapon
Represents a Weapon with a specific type.
Definition
Weapon.hpp:26
ex03
HumanA.hpp
構築:
1.9.8