memory game

I need help making a game board for my memory matching game I stuck because I don't know how to make the values of MusicType[50] go into the answer board or how to make each word be put into the square twice.
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 <iostream>
using namespace std;
int main() {
    
     
    string MusicType[50]={"music","Rock","Hiphop","Punk","Folk","blues","country","RnB","pop","reggae","EDM","dupstep","metal","ska","jazz","disco","nosie","lofi","techno","trap","trance","opera","soul","DooWop","lounge","house","Hyphy","banda", "hardcore","thrash","Crust","nortena","funk","crunk","gfunk","salsa","grunge","emo","samba","surf","mathcore","sludge","doom","screamo","rapcore","TripHop","BoomBap","Drill", "bitpop" ,"Grime"};
    
    
    
    string answerboard [8] [8];
    string Displayboard [8] [8];
    
    for(int i=0; i<50;i++){
        MusicType[i];
        
    }
    for(int row =0; row < 8; row++){
        cout<<"-----------------------"<<endl;
        for(int col =0; col<8; col++){
            cout<< answerboard[row][col]<<" | ";
            
        }
        cout<< endl;


   }
    
    
    return 0;
}
Last edited on
Hi, I read the question a couple of times but could not understand it...

Do you mean you want to fill your matrix 'answerboard' with the values of the array 'MusicType'? Then you can do a simple assignment:

 
answerboard[i][j] = MusicType[k];


If this is not what you want, please be more clear and maybe try to post an example of what you mean.
Topic archived. No new replies allowed.