Question: This is my pokerhand code in C++ Pokerhand.h PokerHand_test.cpp PokerHand.cpp The code works perfectly, I just have a problem with two pair and full house.

This is my pokerhand code in C++
Pokerhand.h
PokerHand_test.cpp
PokerHand.cpp
The code works perfectly, I just have a problem with two pair and full house. If I enter 2,2,3,3,3 I get full house, but if I put 2,3,3,3,2 I get three of a kind.
Can you please help me? Check which line is not correct.
Picture 9,10 are a sample of the code.
Also, I see an error which I dont know why, could you please help with that too? Thank you so much (last picture)
 This is my pokerhand code in C++ Pokerhand.h PokerHand_test.cpp PokerHand.cpp The
code works perfectly, I just have a problem with two pair and
full house. If I enter 2,2,3,3,3 I get full house, but if
I put 2,3,3,3,2 I get three of a kind. Can you please
help me? Check which line is not correct. Picture 9,10 are a
sample of the code. Also, I see an error which I dont
know why, could you please help with that too? Thank you so
much (last picture) Poker Hand.hu Poker Hand.cpp Poker Hand_test.cpp 1 bool containsPair(int
hand []); 2 bool containsTwoPair(int hand[]); bool contains ThreeOfakind(int hand []); bool
contains Straight(int hand[]); 5 bool contains Full House(int hand[]); 6 bool contains
FourOfaKind(int hand[]); 11 Pokerhand.hu Poker Hand.cpp U PokerHand_test.cpp 1 7/include the essential

Poker Hand.hu Poker Hand.cpp Poker Hand_test.cpp 1 bool containsPair(int hand []); 2 bool containsTwoPair(int hand[]); bool contains ThreeOfakind(int hand []); bool contains Straight(int hand[]); 5 bool contains Full House(int hand[]); 6 bool contains FourOfaKind(int hand[]); 11 Pokerhand.hu Poker Hand.cpp U PokerHand_test.cpp 1 7/include the essential files 2 #include 3 using namespace std; 4 1/declare a constant variable 5 const int handsz - 5; 6 7 //declare function signatures 8 bool containsPair(int hand(); 9 bobl contains TwoPair(int hand(); 10 bool contains ThreeOfakind(int hand(); 11 bool contains Straight(int hand(); 12 bool contains Full House(int hand(); 13 bool contains FourOfakind(int hand(); 14 15 //main function 1 16 int main O 17 - { 18 //declare an array of size HAND SIZE 19 int hand[handsz]; 20 21 1/prompt and read five cards 22 cout> hand[0]; 27 } 28 29 // check if the cards contains fourofkindornot 30 //by calling the function 31 //if the return value true, then print massage 32 if (contains FourOfakind(hand)) 33 cout > hand[i]; 22 23 24 1/check if the cards contains fourofkindornot 25 //by calling the function 26 //if the return value true, then print massage 27 if (contains FourofakindChand)) 28 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!