why does this loop never end

1
2
3
4
5
6
7
8
9
10
11
     for(int i=0;i<NUMBER_OF_CARD_VALUES;i++)
           {
                if((CARD_VALUES[i]) == next_char)
                  {
                       return(true);
                  }
                
           }       
        return(false);
        
}

this loop just never ends
Check the value of NUMBER_OF_CARD_VALUES. If it is not a constant, it may have gotten changed.
Topic archived. No new replies allowed.