Seeding value for random function c++
<p>I need to seed a random function with a seed 2222. The shuffleDeck() function calls random_shuffle from the std library. </p>

<p>Note: The problem is, every time I run the program with no_deals=5, and cards_per_hand=5, I get the same pattern:</p>

<p>Jack of Spades, King of Diamonds, 10 of Hearts, 4 of Clubs, King of Spades, 
8 of Diamonds, 3 of Diamonds, 3 of Diamonds, 7 of Hearts, 5 of Clubs, 
3 of Hearts, 10 of Hearts, 6 of Diamonds, King of Spades, Jack of Diamonds, 
7 of Hearts, 3 of Diamonds, King of Diamonds, Jack of Hearts, 3 of Diamonds, </p>

<p>Shouldn't there be a change? Am I inputting the seed 2222 correctly?</p>

<pre><code>srand(2222);

for (int i=0; i&lt;no_deals; i++)
{
   // test.shuffleDeck();
         for(int j=0; j&lt;cards_per_hand; j++)
      {
                //test.dealCard();

                check.at(j)=test.dealCard();
                cout&lt;&lt;check.at(j)&lt;&lt;", ";
                test.shuffleDeck();
      }

       cout&lt;&lt;endl;

}
</code></pre>