title: Adding arrays to vector in for loop with random_shuffle
body: <p>I'm trying to add  int-array permutations into vector in for loop, but when I leave a loop, every vector element is the same.</p>
  
  <pre><code>task_number = 6;
  vector&lt;int*&gt; P_0;
  int* order = new int[task_number];
  for (int k = 0; k &lt; task_number; k++)
              order[k] = k;
  
  for (int i = 0; i &lt; 3; i++)
  {
      random_shuffle(order, order+task_number);
      cout &lt;&lt; endl;
      P_0.push_back(order);
      for (int j = 0; j &lt; task_number; j++)
          cout &lt;&lt; P_0[i][j] &lt;&lt; " ";
  }
  //////////////////////////////////////
  cout &lt;&lt; endl&lt;&lt;endl;
  
  std::vector&lt;int*&gt;::iterator it;
  for (it = P_0.begin(); it != P_0.end(); ++it)
  {
      for (int j = 0; j &lt; task_number; j++)
          cout &lt;&lt; (*it)[j] &lt;&lt; " ";
      cout &lt;&lt; endl;
  }
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>1 3 0 2 5 4
  1 4 5 3 2 0
  1 3 5 4 0 2
  
  1 3 5 4 0 2
  1 3 5 4 0 2
  1 3 5 4 0 2
  </code></pre>
  
  <p>what is the problem? I'm doing something wrong?</p>