title: pthread_create with no arguments?
body: <p>I want to create a thread with no function arguments but I keep getting errors that are seriously bugging me because I cant get something super simple to work right</p>
  
  <p>Heres my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;array&gt;
  #include&lt;pthread.h&gt;
  #include&lt;fstream&gt;
  #include&lt;string&gt;
  
  void *showart(NULL);
  
  int main(int argc,  char** argv){
      pthread_t thread1;
      pthread_create( &amp;thread1, NULL, showart, NULL);
      getchar();
      return 0;
  }
  
  void *showart(NULL)
  {
      std::string text;
      std::ifstream ifs("ascii");
      while(!ifs.eof()) 
      {
        std::getline(ifs,text);
        printf(text.c_str());
      }
  }
  </code></pre>
  
  <p>It gives the error:</p>
  
  <pre><code>main.cpp:11:50: error: invalid conversion from ‘void*’ to ‘void* (*)(void*)’ [-fpermissive]
  </code></pre>