I have created a board in the form of a class.
This is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class Board
{
private:
char board[9];
public:
void SetBoard();
}
void Board::SetBoard()
{
for( int i = 0;i < 9; i++);
{
board[i] = ' ';
}
}
The Line with the comment is giving the error: 'i' : undeclared identifier
Now this is the first time I have encountered this error as i should be defined in the for loop.
Any help??
It seems some error in Copying, since I did put an semicolon at the end of the class.
As for the Extra semi-colon, Athar already pointed it out!
None-the-less thanks!