0
我有一個int a [10] [2]數組。我可以用其他方式分配的值是這樣的:將數組值(行)添加到二維數組C++
int a = someVariableValue;
int b = anotherVariableValue;
for (int i = 0; i < 10; ++i){
a[i][0] = a;
a[i][1] = b;
}
,如:
for (int i = 0; i < 10; ++i){
a[i][] = [a,b]; //or something like this
}
謝謝! :)
謝謝,它的工作:) – Totati
@Attila托特歡迎您。 –