Is typedef ever required in C?

前端 未结 15 2867
夕颜
夕颜 2021-02-13 14:19

Typedef is very useful for portable names, tag names (typedef struct foo Foo;) and keeping complicated (function) declarations readable (typedef int (*cmpfunc

15条回答
  •  鱼传尺愫
    2021-02-13 15:10

    To me, typedef provides abstraction. It keeps my code clean and very easy to understand. You can live without typedef just like you can live without all high level languages and sticking with assembly or machine language.

提交回复
热议问题