summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Kaiser2025-02-10 11:02:37 +0100
committerDominik Kaiser2025-02-10 11:02:37 +0100
commitc5cac15c8c9f9bae331f22efd6d6390325a7421c (patch)
treecca07635f1eefcfde340c58e772f00a8a4b1b0d8
parent8f20b10f6bd9a938a1519f54100f8fbdcdc6431d (diff)
downloadcpp01-c5cac15c8c9f9bae331f22efd6d6390325a7421c.tar.gz
cpp01-c5cac15c8c9f9bae331f22efd6d6390325a7421c.zip
Add randomChump func
-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();
+}