因为typedef是C中的一个存储类,所以不能与static变量一起使用例如,typedef static int SISI a不起作用那么对于typedef使用static还有其他方法吗?
我已经知道这是可以做到的。
Storage Classes in C

最佳答案

你不能。
typedef不声明变量的实例,而是声明一个类型(实际上是类型别名)。
静态是应用于实例的限定符,而不是类型。

关于c - 如何在typedef中使用static?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/11712095/

10-15 02:11