Hi!
I want to explicitly convert 'enum' type into 'int' type.
As written above in the code, Trade_type=(int)value is still producing 'implicit enum conversion' warning. The code compiles OK, since by default 'enum' type is integer (int?), and the Print returns i.e.
2015.05.14 16:47:36.893 MovChi EA EURAUD,H1: -SetBtnTextF()- btnTxtSparam= Trade_btn - value= 1.
For the sake of learning to better understand coding and for the sake of minimizing warnings, please help me resolve this issue.
Thank you,
Best regards,
Simon
S love nia
It used to default to the int type, but it does not any longer. Correct casting is
Trade_type=(TRADE_TYPE)value;
It used to default to the int type, but it does not any longer. Correct casting is
Trade_type=(TRADE_TYPE)value;
Ovo, you are DaMan! It works like a charm. Thank you very mucho!
Best regards,
Simon
S love nia
Thanks a lot! This helped me too!
Regards!
Bruno
Ovo: It used to default to the int type, but it does not any longer. Correct casting is Trade_type=(TRADE_TYPE)value;
| Exactly. Perhaps Chistabo and Leovader should read the manual: Typecasting of Numeric Types |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
I want to explicitly convert 'enum' type into 'int' type.
As written above in the code, Trade_type=(int)value is still producing 'implicit enum conversion' warning. The code compiles OK, since by default 'enum' type is integer (int?), and the Print returns i.e.
2015.05.14 16:47:36.893 MovChi EA EURAUD,H1: -SetBtnTextF()- btnTxtSparam= Trade_btn - value= 1.
For the sake of learning to better understand coding and for the sake of minimizing warnings, please help me resolve this issue.
Thank you,
Best regards,
Simon
S love nia