Yep, I didn't do that right. It's always better to use typedefs to simplify these things.
#include <stdio.h>
typedef double (*PFUNC)(int, double*);
double f1(int n, double *vars) {
...
Type: Posts; User: oogabooga
Yep, I didn't do that right. It's always better to use typedefs to simplify these things.
#include <stdio.h>
typedef double (*PFUNC)(int, double*);
double f1(int n, double *vars) {
...
You haven't thought it all the way through. Try actually writing code to do that and you'll see the problem.
This is clearly a job for arrays, not variable argument lists. It's just too ugly with...
Think about it. How are you going to call your phi0 function from within solve_simul? You can't unpack the variable args into an argument list. However, you could probably pass the va_list itself....