Jump to content
  • Advertisement
Sign in to follow this  
hothead

can I get an example of multidimensional array

This topic is 5397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Quote:
We could ask you the same.


Sorry. I thought it was clear that I was asking hothead about which programming language he would like to see an example of a multidimensional array written in. To which he answered c++. I think woodsmen linked to some good resources as far as that is concerned.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
int array[2][2];
This will make a 2x2 array. You could use various methods of setting the variables, like this one:
Quote:
int x=0,y=0;
int array[2][2];
while(x<2){
while(y<2){
array[x][y] = 1;
y++;
}
x++;
y=0;
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!