title: C++ Join multiple threads
body: <p>I would like to do a for-loop which creates more threads.</p>
  
  <p>I've tried with:</p>
  
  <pre><code>int i;
  for (i = 0; i &lt; 10; i++) {
      thread t1(nThre);
      t1.join();
      cout &lt;&lt; "Joined thread n'" &lt;&lt; i &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>But it does not work. <code>nThre</code> is called sequentially (it is a simple <code>void</code> routine).</p>
  
  <p>I'm also asking if I can use a pre-increment as <code>i</code> is just an <code>int</code>, so:
  <code>++i</code> insted of <code>i++</code>, which should be more performant.</p>