Set on declare (Multi dimensional Arrays)

I can not find it anywhere. I want it to do something like
 
int array[5] = {1,5,9,1,6,9 }

and stuff but how do i do it with multi dimensional arrays

I would like to shorten my game setup code greatly. I just need to know how to set multi dimensional arrays by default like the thing i showed above. I can't find it anywhere. There is a tutorial on here. to set a regular array but not multi dimensional default set thing. Can someone help me with an example on how to set each row. Thanks
int array[2][2] = { { 1, 1}, {2, 2} };
Last edited on
Thankyou So much.

Wait. Which direction is it going per {},{} is it going up in values like regular? I am guessing yes
Last edited on

{ {1, 1}, {2, 2} }


Sets elements { {[0][0], [0][1]}, {[1][0], [1][1]} }
Thankyou so much. I hope i can help others someway sometime :). I know a bit of C++ from the tutorials on this site :) so i might be able to help basic things with people :D
Topic archived. No new replies allowed.