typedef double(*TDblFunc)(double,double); struct SDblFunc { double par; TDblFunc function; }; double Dblfunc(double x, double par) { return MathPow(x,par); } int OnInit() { SDblFunc sdf; sdf.function=Dblfunc; sdf.par=2.0; Print(sdf.function(-1.0,sdf.par)); // -> 1.0
You need to work with typedef here.
lippmaje:
You need to work with typedef here.
thanks that helped .
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have been trying to pass a function by reference to another function but i think i must be doing it in the wrong manner . any quick help is well appreciated