I have stored the members of a matrix into a 1D array. The problem now is that I need to access those members throught a 2 index notation like this:
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;
So, How can I print the matrix [1][1] member stored in on array[] ??