Need help making a minesweeper game

so, I'm trying to make a 3 level minesweeper game for a University project, having a bit of trouble actually getting it to display a grid, all I get is numbers counting up in tens

1
2
3
4
5
6
7
8
9
10
11
12
13
  void showfull()
{
	cout<<" 1  2  3  4  5  6  7  8"<<endl;
	cout<<"_______________________"<<endl;
	for (row=0; row<8; row++) 
	{
    for (col=0; col<8; col++)
	{
    
	
	cout<<col<<row<<' ';

    }


I am also not able to actually 'draw' a table, I have done once, but its completely slipped my mind, can't even work out how to put numbers on the left hand side of the table

Any help?
Example of table:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <algorithm>
#include <iostream>
#include <iomanip>

void display(char field[8][8])
{
    //first line
    std::cout << "  ";
    for(int i = 0; i < 8; ++i)
        std::cout << std::setw(2) << i; //!!!
    std::cout << '\n';

    //Actual table
    for(int i = 0; i < 8; ++i) {
        std::cout << std::setw(2) << i; //Line number
        for(int j = 0; j < 8; ++j)
            std::cout << std::setw(2) << field[i][j]; //!!! Data 
        std::cout << '\n';
    }
}

int main()
{
    constexpr char hidden = '\xFE';
    constexpr char empty = ' ';
    constexpr char mine = '*';
    constexpr char explosion = '#';
    char field[8][8];
    std::fill(&field[0][0], &field[0][0] + sizeof field, hidden);
    display(field);
}
   0 1 2 3 4 5 6 7
 0 ■ ■ ■ ■ ■ ■ ■ ■
 1 ■ ■ ■ ■ ■ ■ ■ ■
 2 ■ ■ ■ ■ ■ ■ ■ ■
 3 ■ ■ ■ ■ ■ ■ ■ ■
 4 ■ ■ ■ ■ ■ ■ ■ ■
 5 ■ ■ ■ ■ ■ ■ ■ ■
 6 ■ ■ ■ ■ ■ ■ ■ ■
 7 ■ ■ ■ ■ ■ ■ ■ ■

By removing setw(2) from line marked by !!! you get:
  01234567
 0■■■■■■■■
 1■■■■■■■■
 2■■■■■■■■
 3■■■■■■■■
 4■■■■■■■■
 5■■■■■■■■
 6■■■■■■■■
 7■■■■■■■■

THANK YOU, this helped alot, although now I have the columns labelled but the rows all have a number, then the row, then a number
Topic archived. No new replies allowed.