How to set values of 2d arrays c++?

i am working on a game and it would be very helpful if i had a 2d array to store coords how do i set values without haveing to write out line by line the values of
coords[4][4];


do i go
coords[0]={3,4,3,2}; //?
To store the values in a 2d array, do this..
1
2
3
4
5
6
coords[][]={
{3,4,3,2},
{1,2,3,4},
{3,1,4,3},
{4,2,3,1}
};


Of course, adjust the amount of data to match to size of the array. You can let it all be on one line if you wish, but I find this way to be more understandable of what is at each array position.
Thanks I wasn't sure how to do it....of course you could go coords[16] but it would make things alot harder
Topic archived. No new replies allowed.