【发布时间】:2019-11-16 08:50:34
【问题描述】:
我已将矩阵的成员存储到一维数组中。现在的问题是我需要通过这样的 2 索引符号来访问这些成员:
int matrix[2][3] = {{ 1 , 2 , 3 },{ 4, 5 , 6 }}; // this is no longer available
int x , y;
//Stored matrix data on array[]
int array[] = {1,2,3,4,5,6}; // only this member available
cout << "Insert the x index : ";
cin>> x;
cout << "Insert the y index : ";
cin>> y;
那么,我如何打印存储在中的矩阵 [1][1] 成员 在数组[]上??
【问题讨论】:
标签: c++