Doerk Hilger:
This piece of code is rejected when I compile from the editor
This piece of code is rejected when I compile from the editor
No compilation errors from metaeditor for the code you posted.
The way out seems to be
#ifdef __MQL5__ public: template<typename T> T Get(int index, T defaultvalue=(T)NULL) #else public: template<typename T> T Get(int index, T defaultvalue=NULL) #endif { /... if (index < 0 || index >= cnt_elements) return defaultvalue; return (T)data[index]; }... but that still does not explain, why the compiler fails when started from editor, and the code looks less proper/safe too.

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
Hi,
phenomenon. This piece of code is rejected when I compile from the editor, but not when its compiled via commandline.
Editor compiler reports: "T" unexpected token for the first line.
Any ideas?