Manual bomb placement in minesweeper

Hi guys, I'm doing a bit of learning and I have been trying to figure out how to set bomb placements manually for test purposes, could someone please assist? the code at GitHub, https://github.com/sfxhewitt/BombAvoider2/blob/master/Code
You could read it in from a file like this:
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
32
File contents:
.....B.
.B.....
....B..
.......
..B....
.B...B.
.......

// ctor for Board that reads from a file
Board(const char *filename) {
    ifstream fin(filename);
    string line;
    int r = 0;
    while (getline(fin, line)) {
        int c = 0;
        for (char ch: line) {
            Square sq(r+1, c+1);
            // ... and add to map ...
            //BTW, Square's ctor should be initializing hidden and marker.

            if (ch == 'B') {
                // setbomb(true) in map
                numbombs++;
            }
            else
                // setbomb(false) in map
            ++c;
        }
        ++r;
    }
}

Sorry, I'm quite the noob, could you put that into my code? I can't even figure out where to put it lol
Topic archived. No new replies allowed.