【问题标题】:Better way to forward declare typedef'd structures in C89?在 C89 中转发声明 typedef 结构的更好方法?
【发布时间】:2009-03-11 00:40:16
【问题描述】:
struct SomeStruct;
typedef struct SomeStruct SomeStruct;

上述方法可行,但有更简单(或更好)的方法吗?

【问题讨论】:

    标签: c typedef forward-declaration c89


    【解决方案1】:

    原来我不需要第一行。第二行单独运行。

    【讨论】:

    • 是的 - 这是明显的缩短!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    相关资源
    最近更新 更多