ねえ、ストーリーラインで関数オオカミ変数を使用したいのですが、これをやろうとしています:
"\nYou awake on a beach to the sound of"<< Wolves().name; " starving and blood hungry,"
"\nThere is a Rock on the ground. You pick it up";
inventory.push_back("Rock");
でもオオカミ().name; タイトル通りのエラーが出ました。なぜ私はこれを行うことができないのですか?
関数 Wolves のコードは次のとおりです。
void Wolves()
{
string name = "Wolves";
int health = 20;
hitPoints() +1;
}