c/c++ 块级作用域

来源:互联网 发布:路由器监控软件 编辑:程序博客网 时间:2024/06/03 02:36
#include <cstdlib>#include <iostream>#include<stdlib.h>#include<stdio.h>using namespace std;int main(int argc, char *argv[]){    if(1){      int a=10;    } else {      int b=9;    }    cout<<a;    system("PAUSE");    return EXIT_SUCCESS;}  
区别于javascript的函数级作用域。
原创粉丝点击