gcc下的typedef错误

Min*_*ong -1 c

在我的代码中,我输入以下代码

typedef Status int;
Run Code Online (Sandbox Code Playgroud)

我得到了以下错误,在linux下'int'之前预计'=',',',';','asm'或' attribute '.

我找不到什么问题.谢谢你的帮助.一个

oua*_*uah 6

使用:

typedef int Status;
Run Code Online (Sandbox Code Playgroud)

代替

typedef Status int;
Run Code Online (Sandbox Code Playgroud)

a typedef的语法与任何普通声明的语法相同:

int a, b;          // declare int objects a and b
typedef int c, d;  // declare int type-aliases c and d  
Run Code Online (Sandbox Code Playgroud)