This is my member function to take the value and suit of a card and return a single string for both variables. (first year of college, go easy on me!) Is there a simpler way to do this? I tried to just return value + suit but I get a conversion error, and its probably more code to convert their type.
Code:string PlayingCard::getCardCode() { string cardCode; cardCode = value; // value is a char defined in the Class header cardCode += suit; // same for suit, both are defined in the default constructor and set to '0' return cardCode; }



LinkBack URL
About LinkBacks



