debut d01 ex03

This commit is contained in:
hugogogo
2022-02-05 19:14:56 +01:00
parent e6929e8e12
commit c1990815e2
11 changed files with 306 additions and 0 deletions

15
d01/ex03/HumanA.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "HumanA.hpp"
HumanA::HumanA( std::string name, Weapon weapon ) {
this->_name = name;
this->_weapon = &weapon ;
}
HumanA::~HumanA() {}
void HumanA::attack( void ) {
std::cout << this->_name << " attacks with their " << this->_weapon->getType() << std::endl;
}