i am trying to store a random value (one of these {"1","2","3","4","5","6","7","8","9","+","STOP","<->","COLOR","TAKI"}) inside a string but when i print the string i always get this output.
╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠
here is my code:
typedef struct RandomCard {
char CardsColor;
char CardType[5];
}Card_info;
typedef struct Player {
char Name[20];
int Cards_Amount;
Card_info Deck[50];
}Player_info;
void GetRandomCard(Player_info players, int Index, int StartCards, int RandomNum);
void main()
{
Player_info players[10];
int Num_Of_Players;
char PFirstName[20];
int Random_Num;
for (int i = 0; i < Num_Of_Players; i++)
{
for (int j = 0; j < 4; j++)
{
Random_Num = (rand() % 10);
GetRandomCard(players[i], j, 0, Random_Num);
printf("%s", players[i].Deck[j].CardType);
}
}
}
void GetRandomCard(Player_info players,int CardIndex, int StartCards, int RandomNum)
{
char Color[4] = { 'R', 'G', 'Y', 'B' };
char CardType[16][5] = {"1","2","3","4","5","6","7","8","9","+","STOP","<->","COLOR","TAKI"};
if (StartCards == 0)
{
strcpy(players.Deck[CardIndex].CardType, CardType[RandomNum]);
}
}