View Single Post
Old February 20th, 2010, 10:49 PM   #1 (permalink)
Jessica
TechSpott Newbie
 
Join Date: Feb 2010
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Jessica is an unknown quantity at this point
Question C++ multidimensional arrays?

Ok, two short questions. This is not homework, if you are wondering.

The first question:

consider this line:

int multi[30][80];

Which of the following is 'multi'

- An array of 30 arrays, each containing 80 ints
- An array of 80 arrays, each containing 30 ints


Second part of the question:

If I did these three lines:

int a = multi[5][15];
int** ptr = &multi[0][0];
int b = ptr[5][15];

is (a == b) for all cases?
Jessica is offline   Reply With Quote Share with Facebook