what about something like this?
Code:
#include <iostream>
enum { DIAMONDS, HEARTS, CLUBS, SPADES } ;
char *strsuit[] = {
"diamonds",
"hearts",
"clubs",
"spades"
};
int main()
{
unsigned int cardsuit;
std::cin>>cardsuit;
if (cardsuit<=3)
std::cout<<strsuit[cardsuit]<<std::endl;
}
In that case 0 is diamonds, 1 is hearts, and so on. It wouldn't be hard to allow strings to be inputted (then setting cardsuit to the appropriate number)
You could also do something similar for the number of the card, ie
Code:
enum { ONE, TWO, /*...*/, JACK, QUEEN, KING, ACE }