auto 类型取数组地址,解引用时报错,帮忙看看
代码
int main(void) {
int ia[3][4] = { 11,12,13,14, 21,22,23,24,31,32,33,34 };
for (auto p = ia;p != ia + 3; ++p)
{
for (auto q = *p; q != *p + 4;++q)
{
//int i = *q;
}
}
}
代码及报错 如下图所示:
书中内容如下图所示:
IDE : Visual Studio 2019