cpp01/ex03/HumanA.cpp

8 lines
235 B
C++

#include "HumanA.hpp"
#include <iostream>
HumanA::HumanA(std::string name, Weapon &weapon) : weapon(weapon), name(name) {}
void HumanA::attack(void) {
std::cout << name << " attacks with their " << weapon.getType() << std::endl;
}