diff options
| author | Dominik Kaiser | 2025-02-10 12:53:16 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2025-02-10 12:53:16 +0100 |
| commit | 57e945f03e37e741a527f07fdcd84307733635e7 (patch) | |
| tree | f6f1b67a329d1547217e421cc58ff6b867a45b2e /ex03/HumanA.cpp | |
| parent | 4b7e380d5f718fe557ef6ae068d7896620bc24f2 (diff) | |
| download | cpp01-57e945f03e37e741a527f07fdcd84307733635e7.tar.gz cpp01-57e945f03e37e741a527f07fdcd84307733635e7.zip | |
Implement HumanA class
Diffstat (limited to 'ex03/HumanA.cpp')
| -rw-r--r-- | ex03/HumanA.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ex03/HumanA.cpp b/ex03/HumanA.cpp index 38d2076..84dec61 100644 --- a/ex03/HumanA.cpp +++ b/ex03/HumanA.cpp @@ -6,7 +6,19 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/10 12:00:00 by dkaiser #+# #+# */ -/* Updated: 2025/02/10 12:00:02 by dkaiser ### ########.fr */ +/* Updated: 2025/02/10 12:51:24 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ +#include "HumanA.hpp" +#include <iostream> + +HumanA::HumanA(const std::string &name, Weapon &weapon) + :weapon(&weapon), + name(name) +{} + +void HumanA::attack(void) const +{ + std::cout << name << "attacks with their " << weapon->getType() << std::endl; +} |
