2D bool array

With this code

char board[10][10];
bool chose[10][10];

I get an error with the bool array

error: 'bool' undeclared (first use in this function)
error: (Each undeclared identifier is reported only once)
error: for each function it appears in.)
error: expected ';' before 'chose'

Note that this is a C application not C++. For whatever reason the code works fine when I make the project a C++ applications instead.
But the char array gives no errors, what is the problem.
Last edited on
bool is not a valid type in C. It was added to C++.
C has no bool type. Just use char's, or some other small data type that your comfortable with, and decide on values for true/false. i.e. 'y' is true and 'n' is false.
Oh ok I'm guessing I could just use a 0 and 1 then.
Topic archived. No new replies allowed.