I have to deal with an enumeration of card suits, decared as follows:
enum suits {spades, clubs, hearts, diamonds};
to create a new card i have to set a private short: value(its value, between 1 and 13) and a private suits: suit.
My program will read in a list of 52 cars in the format:
9 H
1 S
11 C etc.
How do i assign my card a suit using the enumeration, do i say suit = suits{3} or suits{hearts} or what.
thanks for any help
enum suits {spades, clubs, hearts, diamonds};
to create a new card i have to set a private short: value(its value, between 1 and 13) and a private suits: suit.
My program will read in a list of 52 cars in the format:
9 H
1 S
11 C etc.
How do i assign my card a suit using the enumeration, do i say suit = suits{3} or suits{hearts} or what.
thanks for any help