How to use a defined struct from another source file?

前端 未结 7 1970
北恋
北恋 2020-12-06 02:18

I am using Linux as my programming platform and C language as my programming language.

My problem is, I define a structure in my main source file( main.c):



        
7条回答
  •  执念已碎
    2020-12-06 02:58

    C support separate compilation.

    Put structure declaration into a header file and #include "..." it in the source files.

提交回复
热议问题