These are my other classes:
Code:
class Deck
{
public:
// CONSTRUCTION
// Default constructor.
// Summary :
Deck( );
// Copy Constructor.
// Summary :
Deck( const Deck& from );
// Destructor.
// Summary :
~Deck( );
void shuffle(void);
void printDeck(void);
// METHODS
private:
// METHODS
// ATTRIBUTES
Card *mDeck[52];
};
Code:
class Card
{
public:
// CONSTRUCTION
// Default constructor.
// Summary :
Card();
Card( string suit,char pip, int value);
// Copy Constructor.
// Summary :
Card( const Card& from );
// Destructor.
// Summary :
~Card( );
// METHODS
void setSuit( string suit );
string getSuit(void);
void setPip(char pip);
char getPip(void);
void printCard(void);
//mValue
void setValue( int value);
int getValue( void);
protected:
private:
// METHODS
// ATTRIBUTES
string mSuit;
char mPip;
int mValue;
};
I am trying to deal 5 cards into an array so my other functions can just check the array for the poker hands.
this is what i attempted....as my constructor
Code:
Hand::Hand(Deck)
{
string hand[5];
hand[1] = Deck->mDeck[1];
hand[2] = Deck->mDeck[2];
hand[3] = Deck->mDeck[3];
hand[4] = Deck->mDeck[4];
hand[5] = Deck->mDeck[5];
}