#include
using namespace std;
#include"fn1.h"
int n;
int main() {
n = 20;
fn1();
cout << "n的值为" << n;
return 0;
}
//fn1.h 文件
extern int n;
void fn1() {
n = 30;
}
#include
using namespace std;
#include"fn1.h"
int n;
int main() {
n = 20;
fn1();
cout << "n的值为" << n;
return 0;
}
//fn1.h 文件
extern int n;
void fn1() {
n = 30;
}