How to use a function as an argument in a function?

daniel_usikov@agilent.com daniel_usikov@agilent.com
Fri Feb 8 20:10:00 GMT 2002


In C (or C++) I need to transfer a function name to another function, like

double fun(double x){
return x;
}

double calc(double FF(double x)){
 return a=fun(1.0);
}

print (calc(fun));

How can I do it?

With regards
Daniel








More information about the Gcc-help mailing list