在 dev c++ 中使用 SDL 时未终止 #ifndef
Unterminted #ifndef while using SDL in dev c++
我目前在纠正我的开发 C++ 项目中的这个错误时遇到问题,这是我的代码:
#ifndef GRAPHICS_H
#define GRAPHICS_H
struct SDL_Window;
struct SDL_Renderer;
class Graphics {
public:
Graphics();
~Graphics();
private:
SDL_Window* _window;
SDL_Renderer* _renderer;
};
但是编译器说 "unterminated #ifndef" 和'~'标记之前的预期初始化程序,我已经尝试解决这个问题超过 3 个小时但仍然无法解决这个问题。
#ifndef GRAPHICS_H
#define GRAPHICS_H
#ifndef
语句需要用 #endif
结束。您可能应该将它添加到文件的末尾,以便将其中的所有内容都保存在 GRAPHICS_H.
的范围内
我目前在纠正我的开发 C++ 项目中的这个错误时遇到问题,这是我的代码:
#ifndef GRAPHICS_H
#define GRAPHICS_H
struct SDL_Window;
struct SDL_Renderer;
class Graphics {
public:
Graphics();
~Graphics();
private:
SDL_Window* _window;
SDL_Renderer* _renderer;
};
但是编译器说 "unterminated #ifndef" 和'~'标记之前的预期初始化程序,我已经尝试解决这个问题超过 3 个小时但仍然无法解决这个问题。
#ifndef GRAPHICS_H
#define GRAPHICS_H
#ifndef
语句需要用 #endif
结束。您可能应该将它添加到文件的末尾,以便将其中的所有内容都保存在 GRAPHICS_H.