The tic-tac-toe board is a rectangular 3x3 grid. You can use a double nested for loop to iterate through each "box" and display its contents using std::cout. but because you saved it as a one dimensional array, its easier to keep track of where you are by using a counter. you could do math, but this is faster.
1 2 3 4 5 6 7 8 9 10 11 12 13
unsignedint index = 0;
for(int x = 0; x < 3; x++) //the columns,
{
for(int y = 0; y < 3; y++) //the rows
{
std::cout<<ttt[index];
std::cout<<ttt[++index];
std::cout<<ttt[++index];
std::cout<<std::endl;
}
}
this only displays the contents of the array. If you want grid separators (pipe symbols or what have you) you'll need to add those in.
Pretend each square cell is a character, and draw what you want to see on the screen.
Now, when you write to screen, go from left to right and print every square -- including spaces -- and then a newline. Repeat for each additional line. (You will print at least 5 lines.)