title: How can I create a function that takes a parameter of unknown type in C?
body: <p>Say I have the following code:</p>
  
  <pre><code>struct test* t1;
  t1 = get_t(1);
  </code></pre>
  
  <p>... where <code>get_t</code> is:</p>
  
  <pre><code>struct test* get_t(int);
  </code></pre>
  
  <p>How can I refactor the above code and put it in a function? Something like the following:</p>
  
  <pre><code>void r1(?* t, ?* (fn*)(int)) {
      t = fn(1);
  }
  
  /* ... */
  
  struct test* t1;
  r1(t1, &amp;get_t);
  </code></pre>