Mail Archives: djgpp/1997/07/18/09:18:24
Paul Szuch <dunkelzan AT geocities DOT com> wrote in article
<5qjteg$nl2 AT ds2 DOT acs DOT ucalgary DOT ca>...
> On a vaguely related note: how do you declare pointers to functions?
>
void a_function( int a )
{
printf( "%i\n", a );
}
void another_function( void (*func)(int) )
{
func( 1 );
}
int main( void )
{
void (*func_to_call)(int);
func_to_call = a_function;
another_function( func_to_call );
}
so, a function with no args:
void (*func)();
a functions that takes an int and a char*
void (*func)(int,char *);
I think you can carry on from here. :)
- Raw text -