C语言中三维数组的赋值问题

2020-05-24 社会 110阅读
int limit[4][5][2]={{3,8}, {4,9}, {5,0}, {1,6}, {2,7},
{2,7}, {3,8}, {4,9}, {5,0}, {1,6},
{1,6}, {2,7}, {3,8}, {4,9}, {5,0},
{1,6}, {2,7}, {3,8}, {4,9}, {5,0}};
你这样定义是:int limit[20][2]。int limit[4][5][2]应该是
int limit[4][5][2]={ {{3,8}, {4,9}, {5,0}, {1,6}, {2,7}},
{{2,7}, {3,8}, {4,9}, {5,0}, {1,6}},
{{1,6}, {2,7}, {3,8}, {4,9}, {5,0}},
{{1,6}, {2,7}, {3,8}, {4,9}, {5,0}} };
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com