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.