Hello guys,
Sorry to bother you all. I am making a program of checkers and it is in process. But in the stage of debugging, i couldnt understand the error that came.
Kindly , if possible, point me to the right direction.
I am checking whether the coordinates entered by the player are the right location or not.
line 75: C++ does not support implied left hand side in conditionals. You must fully specify the conditions.
Example: if (ans == 'Y' || 'y') evaluates as if (ans == ('Y' || 'y'))
('Y' || 'y') evaluates to 1 (true), before being compared to ans.
Line 9: A string is somewhat overkill for a square on the board, but that does eliminate the initialization problem. However, your board is going to print funny. Because board is an array of strings, and empty squares are null strings, those squares will not print a space, but rather nothing. This will screw up the alignment of your board. I would tend to use char board[8][8] for the board, but that requires initializing every location.
Line 9: Not clear why you've dimensioned the board as 16x16.