主页
C++
C++ 变量作用域
demo_scope
运行 ❯
×
更改方向
保存代码
更改主题
#include
using namespace std; void myFunction() { // Local variable that belongs to myFunction int x = 5; // Print the variable x cout << x; } int main() { myFunction(); return 0; }
5