aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex03/Zombie.cpp
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-11-09 11:26:50 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-11-09 11:26:50 +0100
commitb799c007a1b6911fcbe5141429ea541e1277ebdd (patch)
treed70ad0826ad2fc2d635adf9afecf89af0838d20b /cpp01/ex03/Zombie.cpp
parent1e9d90bdf9ef5fc05093d3449d883597c7f896de (diff)
downloadpiscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.tar.gz
piscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.tar.bz2
piscine_cpp-b799c007a1b6911fcbe5141429ea541e1277ebdd.zip
Fixing some edge cases in cpp00 and cpp01, Updated formatting
Diffstat (limited to 'cpp01/ex03/Zombie.cpp')
-rw-r--r--cpp01/ex03/Zombie.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp01/ex03/Zombie.cpp b/cpp01/ex03/Zombie.cpp
index 40fb849..79f6ad2 100644
--- a/cpp01/ex03/Zombie.cpp
+++ b/cpp01/ex03/Zombie.cpp
@@ -6,19 +6,24 @@
/* 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 */
+/* Updated: 2020/11/09 10:38:44 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include <iostream>
#include "Zombie.hpp"
-Zombie::Zombie(std::string name, std::string type)
+Zombie::Zombie(std::string const& name, std::string const& type)
: m_name(name), m_type(type)
{
announce();
}
+Zombie::~Zombie()
+{
+ std::cout << "<" << m_name << " (" << m_type << ")> AAAAARG... ME DYING" << std::endl;
+}
+
void Zombie::announce()
{
std::cout << "<" << m_name << " (" << m_type << ")> Braiiiiiiinnnssss..." << std::endl;