|
-
December 11th, 2010, 11:35 PM
#1
Array help
This is my first class with C++ and I'm having some trouble with this array.
I an array int guesses[100] and I set up a loop so that the user enters different integers into each element. the user input would be guesses[guess]
i need to compare the current user input with previous inputs in the array. so i set up another loop
for (int i=0 ; i <= MAX_GUESSES ; i++)
then i compared
if ( guesses[guess] == guesses[i] ) {
........
}
This didn't work but I don't know why.help me out here. and please try to remember that I'm only just learning this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|