From 0f3240844dbd5a874e1565a988ef355ededab6a5 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 13 Apr 2020 10:33:05 +0200 Subject: Fixing cpp01 --- cpp01/ex02/Zombie.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'cpp01/ex02/Zombie.cpp') 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 +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/04/13 09:38:16 by charles #+# #+# */ +/* Updated: 2020/04/13 09:40:20 by charles ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include #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; } -- cgit