diff options
Diffstat (limited to 'cpp01/ex02/Zombie.cpp')
| -rw-r--r-- | cpp01/ex02/Zombie.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/cpp01/ex02/Zombie.cpp b/cpp01/ex02/Zombie.cpp index 2ea23b6..40fb849 100644 --- a/cpp01/ex02/Zombie.cpp +++ b/cpp01/ex02/Zombie.cpp @@ -1,14 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* Zombie.cpp :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/13 09:38:16 by charles #+# #+# */ +/* Updated: 2020/04/13 09:40:20 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include <iostream> #include "Zombie.hpp" -Zombie::Zombie(std::string n, std::string t) +Zombie::Zombie(std::string name, std::string type) + : m_name(name), m_type(type) { - name = n; - type = t; announce(); } void Zombie::announce() { - std::cout << "<" << name << " (" << type << ")> Braiiiiiiinnnssss..." << std::endl; + std::cout << "<" << m_name << " (" << m_type << ")> Braiiiiiiinnnssss..." << std::endl; } |
