读书人

[C语言]enum 又小白了 [Warning] decl

发布时间: 2013-06-25 23:45:42 作者: rapoo

[C语言]enum 又小白了 [Warning] declaration does not declare anything

typedef struct {
int error_code;
enum {
EC_FAULT,
EC_EXCEED
};
} MyError;


报了一个warning
[Warning] declaration does not declare anything

上网搜了,enum 应该这样写

enum eventType { singleTouch } type;

本人一直用C++,最近转纯C,发现好多跟C++不一样的,求大神给解释一下,这什么意思


[解决办法]
warning而已嘛!

读书人网 >C语言

热点推荐