extern

假设工程中有a.c,b.c,a.h,b.h

在a.c:#include<b.h>

此时想要在a中使用b中的全局变量int m:extern int b;

原文地址:https://www.cnblogs.com/judes/p/7110450.html