Passing parameters for callback function
<p>I have a functionA which takes in two arguments => a callback function and an argument for the callback function. The argument of the callback could be built in type like int or the user defined type. How could I declare the functionA ? </p>

<pre><code>eg:
void functionA(void (*handler)(TYPEA), TYPEA variableA)
{
  *handler(variableA);
}
</code></pre>

<p>The TYPEA could be the built in type or the user defined type. Should I use dynamic_casting in the handler to cast the typeA to appropriate type based on the callback function( in that case, what should typeA be?) or should I use template in this case?</p>

<p>Thanks.</p>
