C++ Need help iterating through cards, locating pairs and flush's
<p>The program below is suppose to be looking for "Pair's" and "Flush's". It iterates through 10 Trials consisting of 10,000 hands, each hand consisting of 5 cards. The result should (of course it doesn't right now) consist of 10 rows reflecting unique results for each trial. I am stuck...thanks in advance.</p>

<pre><code>#include "card.h"
#include "deck.h"
#include "game1.h"
#include &lt;iostream&gt;
#include &lt;time.h&gt;
#include &lt;stdlib.h&gt;

using namespace std;


int main() {

int pair = 0;
int flush = 0;
int h;  //Hands
int c;  //Cards
int t;  //Trials

const int MAXTRIALS = 10;
const int MAXHANDS = 10000;
const int MAXCARDS = 5;
const int MAXSHUFFLE = 100;

Deck myDeck;
Card myCards[MAXCARDS];
myDeck.shuffle(MAXSHUFFLE);                         //How often would you shuffle?

srand((unsigned)time(NULL));                        //Randon initilizer

for (t = 0 ; t &lt; MAXTRIALS; ++t)                    //Outermost loop for the Trials
{   

    for (h = 0; h &lt; MAXHANDS; ++h)                  //InnerLoop for Hands
    {

        myCards[0] = myDeck.getCard();
        for (c = 1; c &lt; MAXCARDS; ++c)              //InnerMost Loop for Cards
        {
            myCards[c] = myDeck.getCard();
            if (myCards[c].getValue() == myCards[0].getValue()) 
            {
                pair++;                 
            }

            if (myCards[c].getSuit() == myCards[0].getSuit())
            {
                flush++;                        
            }

            myDeck.addCard(myCards[c]);
            c++;

        }
        myDeck.shuffle(MAXSHUFFLE); 
        h++;
    }

    cout &lt;&lt; "pairs: " &lt;&lt; pair &lt;&lt; "\tflushes: " &lt;&lt; flush &lt;&lt; endl;

}
cin.get();
}
</code></pre>

<p><img src="http://i.stack.imgur.com/zWT10.jpg" alt="enter image description here"></p>
