我想使用尚未定义的 typedef 结构,但它是稍后定义的。有没有类似结构体原型的东西?
文件容器.h
// i would place a sort of struct prototype here
typedef struct
{
TheType * the_type;
} Container;
Run Code Online (Sandbox Code Playgroud)
文件 thetype.h
typedef struct {......} TheType;
Run Code Online (Sandbox Code Playgroud)
文件main.c
#include "container.h"
#include "thetype.h"
...
Run Code Online (Sandbox Code Playgroud)