title: fatal error C1004: unexpected end-of-file found
body: <p>I get the above error message (which I googled and found is something to do with a missing curly brace or something), however, I cannot see where this missing bracket is?</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;Windows.h&gt;
  #include &lt;iostream&gt;
  using namespace std;
  
      class Something{
  
  
          static DWORD WINAPI thread_func(LPVOID lpParameter)
          {
              thread_data *td = (thread_data*)lpParameter;
              cout &lt;&lt; "thread with id = " &lt;&lt; td-&gt;m_id &lt;&lt; endl;
              return 0;
          }
  
  
          int main()
          {
              for (int i=0; i&lt; 10; i++)
              {
                  CreateThread(NULL, 0, thread_func, new thread_data(i) , 0, 0);
              }
  
              int a;
  
              cin &gt;&gt; a;
          }
  
          struct thread_data
          {
              int m_id;
              thread_data(int id) : m_id(id) {}
          };
  
      }
  </code></pre>