7 以下代码能够编译通过吗,为什么?常量类型检查
unsigned int const size1 = 2;
char str1[ size1 ];
unsigned int temp = 0;
cin >> temp;
unsigned int const size2 = temp;
char str2[ size2 ];
最后一行提示3个错误,注释char str2[ size2 ];则没有问题
error C2057: expected constant expression
error C2466: cannot allocate an array of constant size 0
error C2133: 'str2' : unknown size