|
CPP01 1.0
|
Implements the zombieHorde function. [詳解]

関数 | |
| Zombie * | zombieHorde (int N, std::string name) |
| Creates a horde of Zombies on the heap. | |
Implements the zombieHorde function.
zombieHorde.cpp に定義があります。
| Zombie * zombieHorde | ( | int | N, |
| std::string | name | ||
| ) |
Creates a horde of Zombies on the heap.
Allocates N Zombie objects in a single allocation and initializes each zombie with the given name using placement new. Handles potential memory allocation failure. The caller is responsible for deleting the returned pointer using delete[].
| N | The number of zombies to create in the horde. |
| name | The name to give to each zombie in the horde. |
zombieHorde.cpp の 35 行目に定義があります。