admin 管理员组

文章数量: 1184232

error: expected an identifier解决方法

keil编译时报错error: expected an identifier,可能是命名重叠了, 比如在stm32f10x.h中有如下定义:
typedef enum {ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
而在另外一个地方又有如下定义
#ifndef ERROR
#define ERROR 0
#endif
将第二个地方的定义取消, 包含第一个定义的头文件就行了

本文标签: 解决方法 error expected identifier