|
|
int *val
does not even know whether it points to single integer or somewhere in array.
array[x][y]
.
|
|
|
|
|
|
val[x][y]
int* val = new int[sizeOfX * sizeOfY];
delete[] val;
val[x + (y * sizeOfX)];
|
|
int** val = new int[sizeOfX][sizeOfY];
[]
and new
. At least I think - I never tried it.*(&val[0] + index) = someValue
and index = x + y*sizeOfX
also in the for loops whats the use of i*c+j?
or mine x + (y * sizeOfX)
|
|
|
|