anonymous
2010-02-27 10:16:17 UTC
My code is...
card ocd; //card obeject that's used to call the card member functions
deck :: deck () //constructor for my deck class
{
for (int i=0;i
if (i == 0)
ocd.setSuit(SPADE); //function call to the card member function and enum type
else if (i == 1)
ocd.setSuit(CLUB);
else if (i == 2)
ocd.setSuit(HEART);
else if (i == 3)
ocd.setSuit(DIAMOND);
for (int j=0; j
ocd.setValue(j+1); //function call to the member function in card class, starts at j+1 because the values for the card start at one
//sets the cardArray private deck member to the card object
cardArray [i][j] = ocd;
}
}
}
Thank you for any help and suggestions.