summaryrefslogtreecommitdiff
path: root/ex00
diff options
context:
space:
mode:
Diffstat (limited to 'ex00')
-rw-r--r--ex00/Zombie.hpp3
-rw-r--r--ex00/main.cpp3
-rw-r--r--ex00/randomChump.cpp8
3 files changed, 11 insertions, 3 deletions
diff --git a/ex00/Zombie.hpp b/ex00/Zombie.hpp
index ecc2352..01dd61b 100644
--- a/ex00/Zombie.hpp
+++ b/ex00/Zombie.hpp
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/10 10:26:18 by dkaiser #+# #+# */
-/* Updated: 2025/02/10 10:56:19 by dkaiser ### ########.fr */
+/* Updated: 2025/02/10 11:00:43 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -26,5 +26,6 @@ class Zombie
};
Zombie* newZombie(std::string name);
+void randomChump(std::string name);
#endif
diff --git a/ex00/main.cpp b/ex00/main.cpp
index 295f75f..2886789 100644
--- a/ex00/main.cpp
+++ b/ex00/main.cpp
@@ -6,7 +6,7 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/10 10:24:56 by dkaiser #+# #+# */
-/* Updated: 2025/02/10 10:56:08 by dkaiser ### ########.fr */
+/* Updated: 2025/02/10 11:00:13 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -16,4 +16,5 @@ int main(void)
{
Zombie* z1 = newZombie("z1");
delete z1;
+ randomChump("z2");
}
diff --git a/ex00/randomChump.cpp b/ex00/randomChump.cpp
index ba20f92..fd8b646 100644
--- a/ex00/randomChump.cpp
+++ b/ex00/randomChump.cpp
@@ -6,7 +6,13 @@
/* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/10 10:27:50 by dkaiser #+# #+# */
-/* Updated: 2025/02/10 10:27:50 by dkaiser ### ########.fr */
+/* Updated: 2025/02/10 10:59:50 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
+#include "Zombie.hpp"
+
+void randomChump(std::string name)
+{
+ Zombie(name).announce();
+}