当我编译我的代码时,VC++返回错误,如上所述。受影响的线路(brushes){5.6, 214.0 , 13.0}
错误:在C++中不允许输入类型名称
更具体地说,这里是受影响的代码块
const brushes palette[] = {
(brushes){5.6, 214.0 , 13.0},
(brushes){200.0, 211.0, 12.0}
};
此代码在Linux下编译好,所以为什么会这样对VC++?
编辑:刷的定义:
typedef union {
struct {
double c;
double m;
double y;
} t;
double v[3];
} brushes;
'brushes'的定义是什么? – Alastair
另外,具体的错误信息是什么? – shelleybutterfly
@shelleybutterfly - 这是特定的,因为它是VC++投掷。 – Skaty