I want to be able to determine if there are less than 9 values of 'S' but it always returns a count larger than it should be. The array is board[7][7].
Edit: The cout for sheepCount is for debugging purposes.
int sheepCount;
sheepCount = 0;
for (int i = 7; i>0; i--)
{
for (int j =0; j<7; j++)
{
if(board[i][j] == 'S')
{
sheepCount++;
cout<< board[i][j];
cout << "\nsheepCount ->" << sheepCount;
}
}
}