MT5 Problem when including enumeration after build 2170
Forum on trading, automated trading systems and testing trading strategies
When you post code please use the CODE button (Alt-S)!

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
- 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.
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.