title: How To Shuffle Number In C++
body: <p>I have number form 1-42
  I want to let C++ shuffle number for me, I have number form 1-42 and I used code below : </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  
  using namespace std;
  int main()
  {
  int S[42]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42};
  random_shuffle(&amp;S[1], &amp;S[42]);
  cout&lt;&lt;S[42];
  }
  </code></pre>
  
  <p>It's working, but the problem is every times i run it, it always show number 3 all the time, I think there is something wrong,
  Please help;</p>