/*const在C++中r默认内部链接.cpp*/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
int main()
{
extern const int a;
cout << "a=" << a << endl;
system("pause");
return EXIT_SUCCESS;
}
/test.cpp/
extern const int a = 10;
/*const在C++中r默认内部链接.cpp*/
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
int main()
{
extern const int a;
cout << "a=" << a << endl;
system("pause");
return EXIT_SUCCESS;
}
/test.cpp/
extern const int a = 10;