语法错误:所有指针在'*'之前缺少';'?
syntax error : missing ';' before '*' for all pointers?
由于某些原因,当我编译我的代码:
class MainClass
{
public:
MainClass(void);
bool init();
bool loadMedia();
SDL_Surface* loadSurface( std::string path );
void gameLoop();
~MainClass(void);
private:
SDL_Window* gWindow;
SDL_Surface* gScreenSurface;
SDL_Surface* gPNGSurface;
SDL_Surface* gPNGSurface;
static const int SCREEN_WIDTH = 640;
static const int SCREEN_HEIGHT = 480;
};
编译器为我拥有的每个指针给出这个错误。任何建议吗?
error C2143: syntax error : missing ';' before '*'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
我猜你不包括SDL_Window和SDL_Surface的头文件(我认为它是SDL.h)
相关文章:
- 删除指向指针的指针是运行时错误吗
- c++中的指针和运行时错误
- 运行几次后合并段错误C++(指针算术)
- LinkedList实现C 错误指针间接
- 虚幻引擎 4.18.0,VS2017,不允许指向不完整类类型的错误指针
- Xcode 错误:指针和双精度之间的比较
- 未分配正在释放的本机node.js插件错误指针
- 错误指针:解析令牌时无法计算表达式
- C++-va_list错误指针
- 为什么我收到错误" (指针的名称)不是模板)?
- mmap 错误:分段错误/指针无效错误
- C++ Winsock2 错误指针断点触发
- C++ 代码中的错误指针错误
- 数组错误指针上的增量运算符
- MAKEINTRESOURCE 返回资源 ID 的错误指针
- 分段错误C++指针
- 段错误指针
- C++ 错误 :: 指针数组的EXC_BAD_ACCESS
- 通过模糊 mat 从 std::vector: <int>cv::Exception 中获取错误指针
- 正在解决编译器错误:指针可能未初始化