CPP01 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Zombie.hpp ファイル

Declares the Zombie class and related functions. [詳解]

#include <cstdlib>
#include <iostream>
#include <string>
Zombie.hpp の依存先関係図:
被依存関係図:

[ソースコード]

クラス

class  Zombie
 Represents a Zombie. [詳解]
 

関数

ZombienewZombie (std::string name)
 Creates a new Zombie on the heap.
 
void randomChump (std::string name)
 Creates a Zombie on the stack and makes it announce itself.
 

詳解

Declares the Zombie class and related functions.

Zombie.hpp に定義があります。

関数詳解

◆ newZombie()

Zombie * newZombie ( std::string  name)

Creates a new Zombie on the heap.

The created zombie is named with the provided name. The caller is responsible for deleting the returned pointer.

The created zombie is named with the provided name. The caller is responsible for deleting the returned pointer. Handles potential memory allocation failure.

引数
nameThe name of the new zombie.
戻り値
A pointer to the newly created Zombie object on the heap, or NULL if allocation fails.

newZombie.cpp29 行目に定義があります。

◆ randomChump()

void randomChump ( std::string  name)

Creates a Zombie on the stack and makes it announce itself.

The zombie is automatically destroyed when the function exits.

The zombie is automatically destroyed when the function exits.

引数
nameThe name of the new zombie.

randomChump.cpp27 行目に定義があります。