+ 1

What is the use of two/multi dimensional arrays in c++?

16th Oct 2017, 9:55 AM
Rao Nathu Singh
Rao Nathu Singh - avatar
2 Respuestas
+ 7
As far as I know.It only just Make your code to be reading easier But whatever two or multi dimensional arrays It will be translated into one dimension arrays And sometimes it make your code not optimized
16th Oct 2017, 10:34 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 4
It will just make it easier for you to represent matrices, cubes, etc using multi dimension arrays. Rest its all the same with normal arrays. After all, no one prefers to do: int matrix[row*col] , than int matrix[row][col]. And : matrix[(row*i)+j] than matrix[i][j] to access the element a(i,j) in the matrix.
16th Oct 2017, 12:11 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar