title: function pointer in a struct with same argument type
body: <p>I am trying to make a struct which has a function pointer for a function that takes the same struct as an argument. I have this at the moment.</p>
  
  <pre><code>typedef struct sharedData
  {
      sem_t* forks;
      int id;
      void (*forkFunc)(sharedData*);
  };
  </code></pre>
  
  <p>I am getting errors like</p>
  
  <blockquote>
    <p>error: expected ‘)’ before ‘*’ token</p>
  </blockquote>
  
  <p>and warnings like </p>
  
  <pre><code> warning: no semicolon at end of struct or union 
   warning: useless storage class specifier in empty declaration
  </code></pre>
  
  <p>what am I doing wrong here?</p>