title: Error compiling thread program in codeblocks
body: <p>My thread program is:</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;thread&gt;
  using namespace std;
  
  void t()
  {
      cout&lt;&lt;"from thread\n";
  }
  
  int main()
  {
       thread i(&amp;t);
       cout &lt;&lt;"from main\n";
       i.join();
  }
  </code></pre>
  
  <p>but it shows following error in codeblocks:</p>
  
  <pre><code>1)'thread ' was not declared in this scope
  2)expected ';' before 'i'
  3)'i' was not declared in this scope 
  </code></pre>
  
  <p>How can I solve it?I am using windows and codeblocks 12.11</p>