Sign in to follow this  
emforce

solved

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this