在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;
};
但是编译器说"未终止#ifndef"和预期的初始化器之前的'~'标记,我已经试图解决这个问题超过3小时,但仍然无法解决这个
#ifndef GRAPHICS_H
#define GRAPHICS_H
#ifndef
语句需要用#endif
关闭。您可能应该将它添加到文件的末尾,以便将其中的所有内容保留在GRAPHICS_H的范围内。
相关文章:
- OpenGL - 在抛出"__gnu_cxx::recursive_init_error"实例后终止调用?
- 多个文件的内存分配错误"在抛出 'std :: bad_alloc' what (): std :: bad_alloc 的实例后终止调用" [C++]
- 我收到以下错误:抛出'std::bad_alloc'实例后终止调用
- 为什么这个 c++ 代码打印出长度 5,当我打印出字符串时,程序会自动终止?
- 当我在其中一个线程执行中(在activemq-cpp中)捕获到特定值时,我如何终止/停止所有其他线程
- llvm构建器向基本块添加终止符
- 如何使用隔离>终止执行来停止所有线程
- 用于将C++代码转换为 Web 程序集的脚本未终止
- C++应用程序 MySQL odbc 数据库连接错误:在引发"otl_tmpl_exception<>"实例后终止调用
- 终止 QProcess 不会终止子进程
- 运行代码时,c++ 会终止进程
- 检测到堆栈粉碎:已终止 中止(核心已转储)
- 在输入句子时终止 std::out_of_range
- 二进制搜索的终止点
- MPI:检查是否有任何进程已终止
- 英特尔 TBB 程序不会终止,可能会误用参考计数器
- 如何改进我的代码,使其不会因超时而终止?(黑客排名挑战)
- while 循环不以哨兵值终止
- 这是我的 .h 文件的一些错误,当我在其中包含我的类模板时,它显示 [错误] 未终止 #ifndef
- 在dev c++中使用SDL时未终止的#ifndef