Jump to content
  • Advertisement
Sign in to follow this  
emforce

solved

This topic is 3301 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

hi guys wondering if you could help i am currently learning how to do arrays and was wondering why this doesn't work? i have an array for gamecosts[3] which works fine but when i implemented this it didn't work any clues? when i run the program it just skips it and goes onto the gamecosts[3] array. what am i doing wrong?

int games[3] = { };
cout << " ";
cin >> games[0];
cout << " ";
cin >> games[1];
cout << " ";
cin >> games[2];

[Edited by - emforce on June 7, 2009 7:02:13 AM]

Share this post


Link to post
Share on other sites
Advertisement
Frankly, I don't understand your problem. The code works fine for me.

Be more precise. What exactly do you expect to happen?

Share this post


Link to post
Share on other sites
i didn't think it was the code the first time i tried it but even if i write a simple output line it still doesn't seem to pick up the new code

Share this post


Link to post
Share on other sites
i copied and pasted the new code into another visual c++ window and it works. but why did the first one not work thanks :D

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!