都和typedef有关

一个是接口机制时用到的

就是所有用到接口的源文件只需包含简单的接口声明

接口的具体实现在其他源文件中实现

接口可以是

//interface.h

typedef struct I *p

p fun();

//implement

typedef struct

{}_I,*_p;

使用时只需include interface.h即可

二一个是不完全类型和它的具体实现

比如可以

typedef struct S  st;

struct S

{

  int a;

}

st abc;

相关文章:

  • 2021-12-04
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-07-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2021-06-09
  • 2022-01-04
  • 2022-01-27
相关资源
相似解决方案