diff --git a/ex00/src/Zombie.cpp b/ex00/src/Zombie.cpp index 90543e9..03f70bb 100644 --- a/ex00/src/Zombie.cpp +++ b/ex00/src/Zombie.cpp @@ -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; } diff --git a/ex00/src/Zombie.hpp b/ex00/src/Zombie.hpp index 341ef63..6243795 100644 --- a/ex00/src/Zombie.hpp +++ b/ex00/src/Zombie.hpp @@ -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); diff --git a/ex00/src/main.cpp b/ex00/src/main.cpp index 7f85357..61b7a07 100644 --- a/ex00/src/main.cpp +++ b/ex00/src/main.cpp @@ -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; } diff --git a/ex00/src/randomChump.cpp b/ex00/src/randomChump.cpp index 25f1917..17f92db 100644 --- a/ex00/src/randomChump.cpp +++ b/ex00/src/randomChump.cpp @@ -4,5 +4,5 @@ void randomChump(std::string name) { Zombie zombie(name); - zombie.announe(); + zombie.announce(); }