当我做类似的事情时
typedef long a;
extern a int c;
它给我错误:声明说明符中有两个或多个数据类型
。为什么?
编辑
typedef long a;
extern a c;
工作正常。那么为什么不在上面呢?
最佳答案
这是一个 typedef,不是宏。编译器看不到 extern long int c
,它看到了 extern a int c
,它包含两种不同的类型(a
和 整数
).
关于c - 为什么不允许使用 extern long int c?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18810520/