error c2007: #define syntax // 注释块中的语法无效?
error c2007: #define syntax // invalid syntax at a comment block?
我目前的问题是我的程序无法编译,尽管它在 30 分钟前就编译过了。
我将一切恢复正常,但我的编译器显示错误消息 ui.h(62): error C2007: #define syntax
。但是第 62 行根本没有代码,因为有一个注释块。
我尝试重建并清除解决方案,但没有任何效果。我使用三种类型的定义。
#define DEFAULT_PATH "C:\"
#define IMG_Y 35
#define TXT_COLOR 0x323232
编辑:添加代码
#define IMG_WIDTH 448
#define IMG_HEIGHT 342
#define IMG_X 96
#define IMG_Y 35
#define DEFAULT_PATH "C:\"
/*
* Requests a path to save the image at from the user
*/
void function(std::string& file_path)
{
std::cout<<"Test"<<std::endl;
}
此错误意味着您的 #define
后面没有标识符。
在您的代码中搜索悬空 #define
。
也可以是#define
之后的评论:
#define //DEFAULT_PATH
我目前的问题是我的程序无法编译,尽管它在 30 分钟前就编译过了。
我将一切恢复正常,但我的编译器显示错误消息 ui.h(62): error C2007: #define syntax
。但是第 62 行根本没有代码,因为有一个注释块。
我尝试重建并清除解决方案,但没有任何效果。我使用三种类型的定义。
#define DEFAULT_PATH "C:\"
#define IMG_Y 35
#define TXT_COLOR 0x323232
编辑:添加代码
#define IMG_WIDTH 448
#define IMG_HEIGHT 342
#define IMG_X 96
#define IMG_Y 35
#define DEFAULT_PATH "C:\"
/*
* Requests a path to save the image at from the user
*/
void function(std::string& file_path)
{
std::cout<<"Test"<<std::endl;
}
此错误意味着您的 #define
后面没有标识符。
在您的代码中搜索悬空 #define
。
也可以是#define
之后的评论:
#define //DEFAULT_PATH