| lauraw487 (5) | |||||||
|
Hi, I'm working on my first OOP project and the goal is to make a deck of cards, shuffle the cards and then rank the first five cards based off of general poker hand hierarchy although I'm not too concerned about the ranking at this point. I just want to get my cards to print haha. Here are the official project guidelines: Create a standard deck of 52 playing cards and list those cards on the screen. "Shuffle" the deck and list the shuffled deck on the screen. random_shuffle from <algorithm> will work on a vector of Cards. Then evaluate the first 5 cards of the deck fora pair (say the card rank, like Pair of Queens) two pair (say something like Pair of Queens and Pair of Twos) three of a kind (say something like Three Kings) full house (say something like Full house, Jacks over fours) etc. This is what I have came up with so far: main:
card.h:
card.cpp
Errors I'm getting are: card:card() is private line 7 of card.h error within this context, main.cpp line 13 error no matching function to call card:card(char& , char&) | |||||||
|
|
|||||||
| Moschops (5961) | ||
Card(myFace[i],mySuit[j]) This constructor does not exist. You can't call functions that don't exist. If it did exist, new would give you back a pointer to a Card, which you are then trying to push_back onto a Vector of Card objects. You can't push_back a pointer-to-Card onto a Vector of Card.
| ||
|
Last edited on
|
||