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.
我有一个file1.c和file2.c。如果我在 中定义一个变量file1.c并为其赋值,我如何从 中访问该变量file2.c?
file1.c
file2.c
我应该如何声明变量file1.c以及如何从中检索值file2.c?
交流:
int a;
啊:
extern int a;
这就是如何。但是不要。这是个坏主意。