ex00: remove useless func and rename announe to announce
This commit is contained in:
parent
5522ebf3ba
commit
cc5928a671
@ -13,23 +13,12 @@ Zombie::Zombie(const std::string& name)
|
||||
this->_name = name;
|
||||
}
|
||||
|
||||
Zombie::Zombie(const Zombie& src)
|
||||
{
|
||||
*this = src;
|
||||
}
|
||||
|
||||
Zombie::~Zombie()
|
||||
{
|
||||
std::cout << "~Zombie()" << std::endl;
|
||||
}
|
||||
|
||||
Zombie& Zombie::operator=(const Zombie& src)
|
||||
{
|
||||
this->_name = src._name;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Zombie::announe()
|
||||
void Zombie::announce()
|
||||
{
|
||||
std::cout << this->_name << ": BraiiiiiiinnnzzzZ..." << std::endl;
|
||||
}
|
||||
|
@ -8,14 +8,11 @@ class Zombie
|
||||
std::string _name;
|
||||
|
||||
public:
|
||||
Zombie(const Zombie& src);
|
||||
Zombie();
|
||||
Zombie(const std::string& name);
|
||||
Zombie();
|
||||
~Zombie();
|
||||
|
||||
Zombie& operator=(const Zombie& src);
|
||||
|
||||
void announe(void);
|
||||
void announce(void);
|
||||
};
|
||||
|
||||
void randomChump(std::string name);
|
||||
|
@ -3,10 +3,10 @@
|
||||
int main()
|
||||
{
|
||||
Zombie* jean = newZombie("jean");
|
||||
jean->announe();
|
||||
jean->announce();
|
||||
delete jean;
|
||||
|
||||
Zombie no_name;
|
||||
no_name.announe();
|
||||
no_name.announce();
|
||||
return 0;
|
||||
}
|
||||
|
@ -4,5 +4,5 @@
|
||||
void randomChump(std::string name)
|
||||
{
|
||||
Zombie zombie(name);
|
||||
zombie.announe();
|
||||
zombie.announce();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user