如何理解const array:
const int times[3] = {11,22,33};
times[1] = 55; // error --> 编译错误。
void func(const int* arr,int len)
{
arr[0] += 2; // error --> 编译错误。
}
如何理解const array:
const int times[3] = {11,22,33};
times[1] = 55; // error --> 编译错误。
void func(const int* arr,int len)
{
arr[0] += 2; // error --> 编译错误。
}
1348
405
1033
4307

被折叠的 条评论
为什么被折叠?