Game.h的代码:的Visual C++:编译器错误C4430
#ifndef GAME_H
#define GAME_H
class Game
{
public:
const static string QUIT_GAME; // line 8
virtual void playGame() = 0;
};
#endif
错误:
game.h(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
game.h(8): error C2146: syntax error : missing ';' before identifier 'QUIT_GAME'
game.h(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
我在做什么错?
不要在头文件中使用''使用''。非常糟糕的juju。否则,很好,全面的答案。 – 2010-05-26 21:16:23