Hi There,
Is there other better way to define a new type for a mixture of integer and character? e.g., if I want to define a card rank which has 1,2,3,...,10 and then A,Q,J,K. I think I have to use union.
Is there any other (maybe better or simpler) ways? Just want to kown how others think about this.
Is there other better way to define a new type for a mixture of integer and character? e.g., if I want to define a card rank which has 1,2,3,...,10 and then A,Q,J,K. I think I have to use union.
Code:
struct {
int num;
char letter;
} CardRank;
Is there any other (maybe better or simpler) ways? Just want to kown how others think about this.