#include <stdio.h>
typedef int(FUNC) (int);
void cplusf (FUNC *myfnc);
int myfunc( int value )
{
int rc;
rc= printf( "The given value
was %d\n", value);
return(rc);
}
int main()
{
int rc;
rc = myfunc(3);
printf("rc=%d\n",rc);
cplusf(myfunc);
}
|
#include <stdio.h>
#include <stdlib.h>
extern "C" {
typedef int(FUNC) (int);
void cplusf (FUNC *myfnc);
}
void cplusf(FUNC *myfunc)
{
int rc;
rc=myfunc(3);
printf("rc=%d\n",rc);
}
|