title: Passing a function pointer with void pointer argument to a function
body: <p>I have a function pointer in a structure, with a void* argument.
  I would like to pass this function to another one, but I get compilation errors...</p>
  
  <p>This is the function declaration in the structure:</p>
  
  <pre><code>void (*on_click)(void *);
  </code></pre>
  
  <p>And this is how I pass the function pointer to my function, where box is a structure:</p>
  
  <pre><code>but1 = create_button(posbut, "test", BUTTON_DEF, &amp;on_click((void *)box));
  </code></pre>
  
  <p>I have the error: cannot convert to a pointer type, and lvalue required as unary ‘&amp;’ operand on this line.</p>
  
  <p>Thanks !</p>