feat: adding the module01/ex01
This commit is contained in:
parent
07022df125
commit
c7e3b1ab02
6 changed files with 251 additions and 0 deletions
23
cpp01/ex01/zombieHorde.cpp
Normal file
23
cpp01/ex01/zombieHorde.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* zombieHorde.cpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/11/04 19:50:26 by rparodi #+# #+# */
|
||||
/* Updated: 2024/11/04 20:28:10 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "Zombie.hpp"
|
||||
|
||||
Zombie* zombieHorde( int N, std::string name )
|
||||
{
|
||||
Zombie *horde = new Zombie[N];
|
||||
if (!horde)
|
||||
return (NULL);
|
||||
for (int i = 0; i < N; i++)
|
||||
horde[i].setName(name);
|
||||
return (horde);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue