#### Archived

This topic is now archived and is closed to further replies.

# Array problem

## Recommended Posts

Zeke    122
Ok i want to create an array that holds the values 00, 01 etc to 20. this is what i have so far [source] int IntArray[5][2]; for (int a=0;a<5;a++) { for (int b=0;b<10;b++) { IntArray=???; } } [\source] im not sure if this is correct and i dont know what to put in place of ??? because i have tried many things and i either get errors or the program crashes. Can someone help? Thanks for your time '' Target=_Blank>Link "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face

##### Share on other sites
Dormeur    122
That''s not a very clear explanation, but I''ll give it a shot. Try this:

  int intArray[5][2];for (int i = 0; i < 5; i++) { intArray[0] = i*2; intArray[i][1] = i*2+1;}

Dormeur