Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のCコードがあります
ファイル名: abc.c
#include<stdio.h> struct abc{ int xxx; float yyy; };
def.c という別のファイルで上記の構造体にアクセスする必要があります。
どうすればこれを達成できるか、誰かに説明してもらえますか?
ありがとう!
// mystructs.h struct abc{ int xxx; float yyy; }; //abc.c #include "mystructs.h" struct abc var1; //another_file.c #include "mystructs.h" struct abc var2;