RapidXMLデータ型のメンバー変数の格納に問題があります。また、メンバー関数の戻り型でこの問題が発生します。
この問題が発生するのは、クラスのファイルヘッダーのみです。関数内でこれらのデータ型を使用しても問題は発生しません。
class Level
{
public:
//Level();
//~Level();
sf::Sprite Update(Camera& _currentView);
char* ReadFile(std::string& _level);
xml_node<>* ParseFile(std::string _level, std::string _tileset);
void BuildLayers(xml_node<>* _fileNode);
void BuildClips();
void BuildPositions();
private:
int tileWidth, tileHeight;
int totalWidth, totalHeight;
std::string tilesetSource;
sf::Texture tilesetTexture;
int tilesetImageWidth, tilesetImageHeight;
//int tilesetWidth, tilesetHeight;
std::vector<std::vector<Tile*>> tilesVector;
//std::vector<Tile*> tileVector;
};
これは私にそのようなエラーをもたらします:
error C2143: syntax error : missing ';' before '<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C2238: unexpected token(s) preceding ';' enter code here
この問題に関連するものを検索しようとしましたが、何も見つかりませんでした。ですから、どんな助けでも本当にありがたいです。