范围for语句输出二维数组

有二维数组a[ ][ ]

for (auto &row : a) {
    for (auto elem : row)
        cout << elem << " ";
    cout << endl;
}

猜你喜欢

转载自blog.csdn.net/weixin_42032099/article/details/91490919