New to c++ so might word this incorrect.
I have a nested for loop that is comparing an array to see if there are any that match.
I am only outputing match, i, & j for testing purposes only.
Code:
for(int i = 0; i <= 3; ++i)
{
for(int j = i + 1; j <= 4; ++j)
{
if(hand[i][0] == hand[j][0])
{ cout << "Match" << " " << i << " " << j;
++ matches;
}
}
}
Sample ouput
out of the 3 listed
1. pair "1"
2. nothing "0"
3. 3 of a kind "3"
What I am wanting is a count for each array. If I cout matches I get a large number.
Thanks,
GJ
Code:
Match 0 3 9H,KS,5C,9C,7C
KC,3S,7D,5S,6D
Match 0 1Match 0 3Match 1 3 TC,TH,QH,TH,8C