13 lines
208 B
C++
13 lines
208 B
C++
|
#include <iostream>
|
||
|
|
||
|
using namespace std;
|
||
|
|
||
|
int x = 200;
|
||
|
int main()
|
||
|
{
|
||
|
int x = 100;
|
||
|
cout << "x = " << x << endl;
|
||
|
// ::x 表示全局的 x
|
||
|
cout << "全局的 x = " << ::x << endl;
|
||
|
return 0;
|
||
|
}
|