#include<iostream> using namespace std; static int test = 0; void func(){} int main() { return 0; }
a,b2个cpp文件里都能用test变量
仅限在a.cpp里面使用
仅限在main函数里使用
仅限在func函数里面使用
仅限在b.cpp里面使用