C programming: Dereferencing pointer to incomplete type error

前端 未结 5 743
春和景丽
春和景丽 2020-12-14 00:03

I have a struct defined as:

struct {
 char name[32];
 int  size;
 int  start;
 int  popularity;
} stasher_file;

and an array of pointers

5条回答
  •  感情败类
    2020-12-14 00:52

    the case above is for a new project. I hit upon this error while editing a fork of a well established library.

    the typedef was included in the file I was editing but the struct wasn't.

    The end result being that I was attempting to edit the struct in the wrong place.

    If you run into this in a similar way look for other places where the struct is edited and try it there.

提交回复
热议问题