having trouble using an array

So I've been doing a minesweeper game and managed to get to the point where I can play the game fully, but now I am trying to set it out so that when a player makes a choice and the the square is not a mine, it shows how many spaces the player is from a mine around the chosen square.


Right now, the chosen square outputs to be blank.
then what is the Question ?
well, how to I get the array to search around the chosen space and output the number in the space?
Can i see what you have tried ?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if (userchoice == 'd' && minesweeper[row][col]==mine||guesses==65)
			{
				cout << "BOOM!!" << endl;
				cout << "You have hit a mine" << endl;
				cout<<"Score = "<<score<<endl;
				cout<<"Guesses ="<<guesses<<endl;
				cout << "Please Play again" << endl;
				game[row][col]=mine;
			}
			else if (userchoice == 'd' && minesweeper[row][col] == 0)
					{
						game[row][col]=' ';
						guesses++;
						score++;
						cout<<userchoice<<endl;
						
					}
Topic archived. No new replies allowed.