re: C/C++刁钻问题各个击破之细说sizeof Hsssssss 2011-08-10 16:58
int len=3;
cout<<sizeof(int [++len])<<endl;
//vs.net中编译通不过
//error C2540: non-constant expression as array bound
re: C/C++刁钻问题各个击破之细说sizeof Hsssssss 2011-08-10 16:51
@二狗子_五哥
int len;
cin>>len;
int array[len];//这句就该报错了!len不是编译期常量,不能当静态数组的长度啊