You might be getting thrown off by the fact that an array is zero based...
therefore to access it by row and col or any other discard the 0 element and make the array greater by 1...
see this sample
Code:
int rows = 10;
int cols = 10;
int *myArray;
myArray = new int[rows * cols + 1];
0 -ignored
1-10
11-20
21-30
......
91-100
myArray[3 * 10l] = 30;
will assign the value 30 to the 31st item or item index 30...
in a two dimensional array this would be item[2][9]....3rd row 10th column....
or to loop through the items..
the following code assigns each index a value equal to it's index
starting at 1 and ending at n
Code:
for(i=0;i<rows;i++)
{
for(j=1;j<=cols;j++)
{
myArray[i*10 + j] = ((i *10) + j);
}
}