I have a 2d Array
g[x][y]
Each coordinate is a single character
For each character found I need to put them in a one string
I did something like this :
It works but now I need mottrouve in the solution arrayCode:for (x = 0; x < LARGEUR; x++) { for(y = 0;y < HAUTEUR; y++) { if (mystere[x][y] == ESPACE) { mottrouve[t] = g[x][y]; t++; } } }
solution is declared like that :
typedef char Mot[MAXLONGUEURMOT+1];
solutionnerMotMystere(Grille g, Mot listeDeMotsDansLaGrille[],int nbMotsDansLaGrille, Mot solution, int *err);
I tryed strcpy(solution, mottrouve), doesn't work
I think It's something about the \0 character...