【发布时间】:2012-02-05 21:43:15
【问题描述】:
我想使用一个尚未定义的 typedef 结构,但它是稍后定义的。 有没有类似结构原型的东西?
文件容器.h
// i would place a sort of struct prototype here
typedef struct
{
TheType * the_type;
} Container;
文件类型.h
typedef struct {......} TheType;
文件 main.c
#include "container.h"
#include "thetype.h"
...
【问题讨论】:
-
不确定您要在 TheType 和 Container 之间建立什么样的关系。你具体问的是什么?
-
@octopusgrabbus 他想“转发声明
typedef”
标签: c coding-style typedef forward-declaration