i'm trying to print the suits of the cards
typedef enum{diamonds, spades, hearts, clubs}SUIT;
typedef struct{
SUIT suit;
int value;
}CARD;
typedef struct{
CARD *cards[52];
int atual; /*indicates the next card to be withdrawal of the deck*/
}DECK;
typedef struct{
char name[30];
CARD hand[3];
CARD biggest_card;
int num_victories;
}PLAYER;
switch(suit)
{
case 0:
return 4;
break;
case 1:
return 6;
break;
case 2:
return 3;
break;
case 3:
return 5;
break;
}
//for example...
printf("%d %c", deck[i].cartas.value, deck[i].cartas.suit);
it prints, but all characters are wrong... and i look for then in the table ascii
does any one knows why this doesnt work?