我有一个游戏级
#include "../player/Player.h"
class Game {
protected:
GameBoard board;
std::vector<Player*> allPlayer;
//other stuff
};
但是当我尝试编译时,我得到error: ‘Player’ has not been declared
和error: template argument 1[and 2] is invalid
。
我完全不知道,如何调试此错误。我没有拼写错误,我的IDE(CLion)似乎没有任何问题(错误包括路径等)。
Soooo,出了什么问题? ^^
编辑:Player.h
#include "../game/moveTypes.h"
#include "../board/GameBoard.h"
class Player {
protected:
sign color;
public:
sign getColor() const;
public:
Player(sign playersColor);
virtual move generateInput() = 0;
};