C++ Unresolved overloaded function type
<p>I am running into issue with the typedef/call back function.</p>

<pre><code>typedef void (*timer_cb_fn_t)(void); //defined in timer.h
</code></pre>

<p>Here is the definition of timer_start function defined in timer.cpp</p>

<pre><code>unsigned int TimClass:: timer_start(unsigned int interval, timer_cb_fn_t cb)
{
 //do stuff 
}
</code></pre>

<p>dpl.h includes timer.h</p>

<p>I am trying to invoke the timer function from dpl.cpp file
where call back function is defined as </p>

<pre><code> void Dpl::receive_timeout(void)
    {
        receive_state = STATE_IDLE;
    }
</code></pre>

<p>I am invoking the function timer start with the following call. </p>

<pre><code>unsigned int receive_timer = timer_start(TIMER_FRAME_TIME_MS, receive_timeout);
</code></pre>

<p>The g++ compiler throws the following errors. </p>

<pre><code>./src/dpl/dpl.cc:138:107: error: no matching function for call to ‘TimClass::timer_start(unsigned int, &lt;unresolved overloaded function type&gt;)’
../dpl.cc:138:107: note: candidate is:
../timer.h:256:16: note: unsigned int TimClass::timer_start(unsigned int, timer_cb_fn_t)
../timer.h:256:16: note:   no known conversion for argument 2 from ‘&lt;unresolved overloaded function type&gt;’ to ‘timer_cb_fn_t {aka void (*)()}’
make: *** [build/dpl.o] Error 1
</code></pre>

<p>Could you please explain how to address this? </p>