title: Enum pointer parameter in C
body: <p>I'm writing some testing functions for a project. The test function takes a function pointer, an expected value and a test value and checks them:</p>
  
  <pre><code>int TestIntInIntOut(int (*func)(int val), int expected, int testvalue);
  </code></pre>
  
  <p>However, I'm also testing functions which can take an enum as a parameter or as an exit value.</p>
  
  <p>Suppose the following:</p>
  
  <pre><code>typedef enum { Zero, One, Two } MyEnum;
  </code></pre>
  
  <p>Is there a way I can pass an entire enum as a type? For <strong>any</strong> enum. For example:</p>
  
  <pre><code>int TestIntInEnumOut(?enum? (*func)(int val), ?enum? expected, int testvalue);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>int TestEnumInIntOut(int (*func)(?enum? val), int expected, ?enum? testvalue);
  </code></pre>
  
  <p>(Sort of like what a generic in C# would allow.)</p>