cpp01/ex03/HumanA.cpp

9 lines
235 B
C++
Raw Permalink Normal View History

2025-05-12 14:00:11 +02:00
#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;
}