title: Passing struct into a function from pthread_create
body: <p>I am fairly a newbie in C, Could anyone help me ?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;pthread.h&gt;
  #include &lt;windows.h&gt;
  
  struct New
  {
   char a;
   int b;
  };
  
  
  void *Print_Func (void* Ptr)
  {
   Sleep(5);
   printf("%d\n",Ptr.a);
   printf("%d\n",Ptr.b);
  }
  
  int main (void)
  {
   pthread_t Thread1;
   while(1)
   {
    struct New Flag;
    Flag.a=5;
    Flag.b=1234567;
    pthread_create(&amp;Thread1,NULL,Print_Func,&amp;Flag);
    pthread_join(Thread1,NULL);
    printf("\n");
   }
   system("pause&gt;nul");
  }
  </code></pre>
  
  <p>Why compiler always reports</p>
  
  <p>error: request for member 'a' in something not a structure or union</p>
  
  <p>error: request for member 'b' in something not a structure or union</p>
  
  <p>Envir. : Windows7 C:B mingw32-gcc.exe</p>
  
  <p>Thanks</p>