How to make bool and void in board??

void(..)
bool(..)

Direct to the board[8][8]. Help.
Last edited on
What's the declaration of board? We need to know the type.
I just include the setw(3). Because of the IOMANIP.
Last edited on
printf("%d %d\n", setw(3), board[x][y]);

Should be right for printing two ints.

setw(3) appears to be a function, what does this function return?
Last edited on
printf("%3d", board[x][y]);
TY.
Can I do void's and bool's?
It's better not to edit our delete questions posted on the forums because the thread makes no sense historically. We sort of hope that a thread can be used as a reference later on.

So, to restate the questions: What's the C equivalent of cout << setw(3) << board[x][y] where board is of type int** board?
 
printf("%3d", board[x][y]);


Can I do void's and bool's?
We can do bool, but void means unspecified type, and we need to interprest the bit pattern if you want to display it, so no, you can't do void.

For bool:
 
printf("%s", board[x][y] ? "true" : "false");

Last edited on
Topic archived. No new replies allowed.