1
我的第一篇文章,在此先感谢。 我是C++的新手,我正在努力应对这个错误。C++错误 - <unnamed-tag>一个匿名初始化器不允许匿名工会的成员
typedef struct {
int x;
int z;
char ref[20]; // or of other adequate type
DATE date;
bool put;
int hasPiece = false;
} TRequest;
当我建立它在标题
"<unnamed-tag>::hasPiece' : an in-class initializer is not allowed for a member of an anonymous union in non-class scope.
能否请你帮我显示错误?非常感谢
为什么要标记'C#'??! – Null
这不是c#代码,不要将它标记为 – TheLethalCoder
您知道结构名称以及类名称会自动定义为类型名称,对吧?所以你不需要在C++中为结构或类使用'typedef'。也许你需要[一本很好的初学者书籍](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list)? –