I made a multidimensional array with 2 indices and it worked great. Data comming out exactly as expected.
Then I took the same array and added a third indices, however when I run the program all my values come out just fine with the exception that they are in hexadecimal.
I'm not at home on the machine with the problem on it. But if needed I can put up a cut/paste as soon as I get home.
All I want to know is why is it in hexadecimal and how can I force into decimal.
Thanks for the help ahead of time, I spent two days in books and on google etc looking this up and finally decided it was time for help.
With a 3 dimensional array, you need 3 brackets to access the values properly, otherwise the compiler thinks your accessing a pointer, explaining the hex.
int arr[3] [3] [3]= {{1,2,3} , {4,5,14} , {15,16,17}};
is [x][y][z] isnt it?
forgive me if I'm not gettin it, its not making sence or giving me decimal answers that way.
Your explanation I get about it thinking its accessing a pointer but with
[3][3][3] that seems to be what your saying. (i compiled it again just to make sure.) and it still gives hex.
No, it thinks its a pointer when you access a 3d array using only 2 sets of brackets, which is what your doing in your cout statements. The reason its outputting actual numbers instead of addresses is because of how arrays work under the hood.