我如何...制作动态数组 [英] How do I...make dynamic array
本文介绍了我如何...制作动态数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我想为4行和11个col创建一个2维数组,并且想要制作最后一个cols
值-4和其他值5. br />
我怎么能用c ++做到这一点。
if I want to create a 2 dimension array for 4 rows and 11 cols and want to make the last cols
values -4 and other values 5.
how can I do that in c++.
推荐答案
int myArray[][] = {
{ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, -4 },
{ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, -4 }
};
这篇关于我如何...制作动态数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文