d02 ex02 errors comparisons and _value

This commit is contained in:
Hugo LAMY
2022-02-18 18:40:18 +01:00
parent 46fd7395b2
commit ab0a2c4184
6 changed files with 23 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ ScavTrap::ScavTrap( std::string name ) : ClapTrap(name) {
_energy = 50;
_attack = 20;
std::cout << _class << " " << _name << " created with number " << _number << "\n";
std::cout << _class << " " << ScavTrap::_name << " created with number " << _number << "\n";
return;
}
@@ -17,6 +17,14 @@ ScavTrap::ScavTrap( std::string name ) : ClapTrap(name) {
*/
ScavTrap::~ScavTrap( void ) {
std::cout << _class << " " << _name << " destructed\n";
std::cout << _class << " " << ScavTrap::_name << " destructed\n";
return;
}
/*
* special capacity
*/
void ScavTrap::guardGate() {
std::cout << _class << " entered special mode Gate Keeper\n";
}

View File

@@ -12,6 +12,8 @@ public:
ScavTrap(std::string name);
~ScavTrap();
void guardGate();
};
#endif

Binary file not shown.