“warning: useless storage class specifier in empty declaration” in struct

前端 未结 4 684
悲&欢浪女
悲&欢浪女 2021-02-05 17:37
typedef struct item {
    char *text;
    int count;
    struct item *next;
};

So I have this struct with nodes defined as above, but Im getting the er

4条回答
  •  既然无缘
    2021-02-05 18:21

    I'm not sure, but try like that :

    typedef struct item {
      char *text;
      int count;
      struct item *next;
    }item;
    

提交回复
热议问题