Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!
rpcastro1979:
Hi, after build 2170 my code is not compiling anymore.
I am getting erros on the usage on enumeration, it is not recognizing an include of a custom enumeration.
ENUM_TEST have been defined in the scope of ClassA. If you want to access it globally put it outside of the class.
- MT5 now has proper scoping
New MetaTrader 5 platform build 2170: MQL5 scope, global Strategy Tester and built-in Virtual Hosting updates - Trading Strategies That Work - General - MQL5 programming forumEither do as Ehsan suggests, or use proper scoping
class ClassB{ private: ClassA::ENUM_TEST test; // Default category
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor
William Roeder:
- MT5 now has proper scoping
New MetaTrader 5 platform build 2170: MQL5 scope, global Strategy Tester and built-in Virtual Hosting updates - Trading Strategies That Work - General - MQL5 programming forumEither do as Ehsan suggests, or use proper scoping
- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor
Thank you very much guys.
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, after build 2170 my code is not compiling anymore.
I am getting erros on the usage on enumeration, it is not recognizing an include of a custom enumeration.
Example:
Compilation ERROR:
'ENUM_TEST' - unexpected token, probably type is missing? ClassB.mqh 8 4
Tks.