📄 #test.chsh#
字号:
int x; // global xint main(){ int i; cout<<"Please input i:"; cin>>i; x = 99; // global x is 99 if(i == 4) { int x; // local x int num; // local to if statement x = i * 2; cout << "Outer local x before loop: " << x << "\n"; while(x--) { int x; // another local x x = 18; cout << "Inner local x: " << x << "\n"; } cout << "Outer local x after loop: " << x << "\n"; } // Can't refer to num here because it is local // to the preceding if block.// num = 10; cout << "Global x: " << x << "\n";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -