I have a 2D array with 108 strings. How do I shuffle it correctly?
I don't think I'm doing it right
Code:void Shuffle( char dest[208][13] ) { // Initialize variables char temp[13]; // Loop and shuffle(swap array values) for (int i=208; i>1; i-- ) { int m = i + rand()%(208-i); strcpy(temp,dest[m]); // strcpy(dest[m],dest[i]); strcpy(dest[i],temp); cout << destination[i] << " "; }
The program force closes.