Minesweeper Co-ordinates number alignment

Hi Guys, Just wondered if any one could help??

Currently I'm trying to write a basic program in C++ for a minesweeper game, but I am having issues with the alignment of my numbers on the Intermediate and Expert game boards.

The numbers above the columns of the board are not aligned with the boxes below I didn't seem to have any issues with the single digit numerals but when I got to 10,11,12,13 and so on they became unaligned.

Any suggestions. I can email a screenshot of the compiled code if anyone needs to see it as I am not great at explanations.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void board_E()
{
shuff_array3();
int line = 0;
	cout << "  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23 \n";
	for (int j = 0; j < 24; j++)
	{
		cout << line;
		line++;
		for (int i = 0; i < 24; i++)
		{
			cout << "[" <<grid_E[j][i]<< "]";
		}
		cout<<endl;
	}
	play3(); 
	_getch();
}
Topic archived. No new replies allowed.