int len=3;
cout<<sizeof(int [++len])<<endl;
//vs.net中编译通不过
//error C2540: non-constant expression as array bound

@二狗子_五哥
int len;
cin>>len;
int array[len];//这句就该报错了!len不是编译期常量,不能当静态数组的长度啊
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

导航

统计

常用链接

留言簿

文章分类

文章档案

收藏夹

搜索

最新评论