aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex02/Zombie.cpp
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-04-13 10:33:05 +0200
committerCharles <sircharlesaze@gmail.com>2020-04-13 10:33:05 +0200
commit0f3240844dbd5a874e1565a988ef355ededab6a5 (patch)
treeefc1a1307863d173be17a12fbab6b84fe7d00960 /cpp01/ex02/Zombie.cpp
parent629d52b1262879a346e9ca17567a8f483c60ba0a (diff)
downloadpiscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.gz
piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.bz2
piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.zip
Fixing cpp01
Diffstat (limited to 'cpp01/ex02/Zombie.cpp')
-rw-r--r--cpp01/ex02/Zombie.cpp19
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;
}