そこで、VisualStudio2010を使用してC++でテキストベースのゲームを作成しようとしています。これが関連していると思われるコードブロックの一部です。もう必要な場合は、遠慮なく私に聞いてください。
場所というゲームのクラスを作成しようとしています。私は場所を作ります、そしてそれはそれの北、南、東、そして西に別の「場所」を持っています。私は今本当に混乱しています。私はこのようなものの初心者です。私はただ何かを見ているだけかもしれません。
//places.h------------------------
#include "place.h"
//Nowhere place
string nowheredescr = "A strange hole to nowhere";
place nowhere(&nowheredescr, &nowhere, &nowhere, &nowhere, &nowhere); //Error occurs here
//
//place.h------------------------
#ifndef place_h
#define place_h
#include "classes.h"
class place
{
public:
place(string *Sdescription, place *Snorth, place *Ssouth, place *Swest, place *Seast);
~place(void);
private:
string *description;
place *north;
place *south;
place *east;
place *west;
};
#endif
//place.cpp-------------------
#include "place.h"
#include <iostream>
place::place(string *Sdescription, place *Snorth, place *Ssouth, place *Swest, place *Seast)
{
description = Sdescription;
north = Snorth;
south = Ssouth;
west = Swest;
east = Seast;
}
place::~place(void)
{
}