How to print array on console screen?

Hello I have a question about arrays.
How to print these arrays on the console screen? I don't want to print just one, I want to print out all of them at once. Like for example everytime i want to print it out. I just need to type: cout << board; and it prints out for me something like that.

1
2
3
4
char board [3][3];
{'1', '2', '3'},
{'4', '5', '6'},
{'7', '8', ' '},


Thanks :)
I'd write a print() function containing something like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>

using namespace std;

int main(){
    char board [3][3] ={ {'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', ' '} };

    for(int row = 0; row < 3; row++)
    {
        for (int column = 0; column < 3; column++)
        {
            cout<< board[row][column];
        }
        cout<<endl;
    }
}
Thank you so much!! :) that is exactly what i wanted to know.
Topic archived. No new replies allowed.