Dec 10, 2013 at 3:15am UTC
i am programming a black jack game and i am having a problem putting the values into the strings can someone help me to solve this problem.
here is what i have for the array strings:
class Card{
public:
string getSuit() const;
string getFace() const;
Card();
Card(int CardPar);
private:
int card;
static string cardFaces[];
static string cardSuits[];
};
class Deck{
public:
Deck();
Card deal();
void shuffle();
private:
static const int CARDSINDECK = 52;
Card cards[CARDSINDECK];
int nextCardIndex;
};
char *hearts = "\x03";
char *diamonds = "\x04";
char *clubs = "\x05";
char *spades = "\x06";
string Card::cardFaces[] = {"A", "2", "3", "4", "5","6", "7", "8", "9", "10", "J", "Q", "K"};
string Card::cardSuits[] = {hearts, diamonds, clubs, spades};
so how exactly would i be able to store value in these please help
Last edited on Dec 10, 2013 at 5:02am UTC