Laszlo Tormasi:
Declare the class first and then use it in functions. You can forward declare at the top of your code.
Declare the class first and then use it in functions. You can forward declare at the top of your code.
Thanks a lot, Laszlo !
Since I am coming from C# background that is really strange for me {my classes in C# are always at the very end of the file}. Anyway I put the class declaration first and it worked OK!
:)
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 a custom class in MQL4 and I would like to create a function that returns a instance of it.
Here is my code:
What am I doing wrong?