#ifndef STAGE_TABLE_DEFINITION_HEADER
#define STAGE_TABLE_DEFINITION_HEADER
typedef stage_table_context_t* (*stage_table_function_t)(stage_table_context_t*);
typedef struct {
const char* stage_name;
stage_table_function_t* function;
} stage_t;
typedef struct {
uint32_t error_number;
stage_t* current_stage;
} stage_table_context_t;
#endif
上出现未知类型错误stage_table_context_t
。
函数指针stage_table_function_t
指代stage_table_context_t
和stage_table_context_t
指代stage_table_function_t
。
显然定位在这里并不重要,因为任何一个方向都会导致问题。似乎我需要转发声明舞台表上下文结构,但不确定如何使用 typedef 来执行此操作。
为这个愚蠢的问题道歉,我已经离开 C 6 个月了,我有点脑子放屁。
编辑:修正了代码中的一些错字。