我对C语言比较陌生,我遇到了一个没有名称的结构的typedef。
这有什么意义呢?
#define POLY(name,deg)    \
    term name[deg] = {0};
typedef struct {
  int coeff;
  int exp;
} term;发布于 2019-01-08 06:10:42
然后,可以单独使用term来表示该类型。在C语言中,使用struct term { ... };时,您必须使用struct term来引用类型。
这与C++有所不同,在struct term { ... };这样的定义中,只将struct term和term作为有效引用隐式引入。
https://stackoverflow.com/questions/54082560
复制相似问题