[英]C - Array type has incomplete element type for array of structs
typedef char line_t[MAX_INPUT + 1];
struct {
line_t line;
double score;
int linenumber;
} line_rank;
struct line_rank lines[MAX_LINES + 1];
產生以下error: array type has incomplete element type
,它指向我提供的代碼的最后一行。
我到處都看過,似乎找不到與以這種方式操縱的結構有關的另一個問題。
您可能要添加typedef
並刪除struct
。
typedef char line_t[MAX_INPUT + 1];
typedef struct {
line_t line;
double score;
int linenumber;
} line_rank;
line_rank lines[MAX_LINES + 1];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.