This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to use a function as an argument in a function?
- From: daniel_usikov at agilent dot com
- To: gcc-help at gcc dot gnu dot org
- Cc: daniel_usikov at agilent dot com
- Date: Fri, 8 Feb 2002 18:49:21 -0800
- Subject: How to use a function as an argument in a function?
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