123456789101112131415161718192021222324252627
class Card { private: int number, suit; public: Card () { number = 1; suit = 1; }; Card (int N, int S) { number = N; suit = S; }; void setCard(int N, int S){ number = N; suit = S; }; int getNumber () { return number; }; string getSuit () { return suit; }; void printCard(){ //the conversion should go here? cout << getNumber() << " of " << getSuit() << endl; }; };
const string suits[] = {"Clubs", "Diamonds", "Hearts", "Spades"}
123456789
string getSuit(int num){ string str; if//Code here else if... return str; }