Kevin Sivits wrote:

> I have a funtion 
> int foo(int *)
> 
> I also have have a funtion which takes as a parameter a function
> pointer of type 
>  void * (*)(void *)
> 
> what is the syntax cast function foo to this type?  I couldn't find a hint
> in the c faq.

        (void * (*)(void *)) foo

Although it may be preferable to simplify things using a typedef, i.e.

        extern bar(void * (*)(void *));

        typedef void * somefunc_t(void *);

        bar((somefunc_t *) foo);

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to