C++二维数组问题
迷茫
迷茫 2017-04-17 11:48:38
0
2
361

int a[][2]={1,{3,4},5};
书上说这个是错的 请问错在哪啊。。
我用codeBlocks编译之后 报错
error: braces around scalar initializer for type 'int'|

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
PHPzhong

The subject of the question can be written like this:

int a [][2] = {
    {1},
    {3, 4},
    {6}
}
左手右手慢动作

int a[][2]={{3},{3,4},{6}}

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template