I am trying to print out a 5X8 grid of characters from A to U in pairs just like
SHIENULD
SKULDEIN
etc..
here is my code
void Memory::fillBoard()
{
srand(time(NULL));
int symbol = 0;
char cards_two[4][5];
int randcards[21];
for (int i = 65; i < 86; i++)
{
randcards[i-65] = i;
}
char cards[21];
for (int i = 0; i < 20; i++)
{
symbol = i + rand() % (20 - i);
cards[i] = randcards[symbol];
randcards[symbol] = randcards[i];
}
for (int x = 0; x < 4; x++)
{
for (int k = 0; k < 5; k++)
{
cards_two[x][k] = cards[x * 5 + k];
cout << cards_two[x][k] << " ";
}
cout << endl;
}
}