title: C - expected declaration specifiers or ‘...’ before function arguments
body: <p>My header has defined the following codes:</p>
  
  <pre><code>typedef uint8_t EnrollT(uint16_t test1, uint16_t test2);
  typedef void ChangeT(uint64_t post1, uint8_t post2);
  
  struct ClusterT * ClientAlloc(EnrollT *, ChangeT *);
  </code></pre>
  
  <p>I have implemented these two functions and pass those to ClientAlloc() in my c file as shown in the following:</p>
  
  <pre><code>ClientAlloc(Enroll, Change);
  </code></pre>
  
  <p>However, when I compile the source, the errors pops up.</p>
  
  <pre><code>expected declaration specifiers or ‘...’ before ‘enroll’
  expected declaration specifiers or ‘...’ before ‘change’
  </code></pre>
  
  <p>Is there anything I may miss here?</p>
  
  <p>For <code>EnrollT</code> and <code>ChangeT</code>, I declare it in my code:</p>
  
  <pre><code>uint8_t Enroll(uint16_t test1, uint16_t test2){...};
  void Change(uint64_t post1, uint8_t post2){...};
  </code></pre>
  
  <p>For <code>ClienAlloc</code>:</p>
  
  <pre><code>struct ClusterT * ClientAlloc(Enroll, Change){... return something};
  </code></pre>