#include<iostream>
using namespace std;
int& f();
int main () {
int i= f();
cout<< i;
return 0;
}
int& f () {
static int i= 5;
return i;
}
在VC中LINK ERROR, 在BC中通过, why???
using namespace std;
int& f();
int main () {
int i= f();
cout<< i;
return 0;
}
int& f () {
static int i= 5;
return i;
}
在VC中LINK ERROR, 在BC中通过, why???
project--setting--link--project options:
找到 /subsystem:windows
改为 /subsystem:console