Pb with passing a function as parameter 
Author Message
 Pb with passing a function as parameter

Hi ,

I wrote a function:

void funcs1(float a, float b[], float c [],int d);

and I would like to pass it to another function:

void funcs2(float x[], float y[], float sig[],
        void (*funcs1)(float, float [], float [], int), float e);

in my main routine I wrote :
void (*fun)(float, float*, float*,float *, int)= funcs1;

but I don't know how to pass funcs1 to funcs2 with the correct
parameters.

I tried to call funcs2 this way:
funcs2(a, b,c,(*funcs1)(i,j,k,l),e);

after declaring :
float a, i, e;
float *b, *c, *j, *k;
int d;

but this is not working;

Thanks for helping
--
/*******************************************************/
/*                Philippe Gerard                      */

/*******************************************************/



Fri, 08 Dec 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Pb with passing a row of a matrix to a function

2. Passing C++ Class Member Function to as a C Callback Function Parameter

3. calling C++ function from Fortran: parameter passing

4. how do I pass arrays as parameters to functions - newbie

5. parameters pass between function and main

6. Passing parameters to a Thread'ed function

7. Pass parameter to a function

8. function passed as parameter....

9. Passing parameters to a function

10. passing parameters with functions

11. passing unknown number of parameters to a function

12. optional parameter passing in Turbo C functions

 

 
Powered by phpBB® Forum Software