#define uint8 uchar #define int16 short #define int32 int #define uint16 ushort #define uint32 uint
While this works, it is not as useful as typedef, because you won't get a type warning when assigning different custom types that translate to the same base type.
Is there a reason why typedef doesn't work the way it does in C++?
While this works, it is not as useful as typedef, because you won't get a type warning when assigning different custom types that translate to the same base type.
Is there a reason why typedef doesn't work the way it does in C++?
Because MetaQuotes didn't code it that way. Define your own
#define PRICE double // A PRICE #define PRICE_MAX (PRICE)EMPTY_VALUE #define PRICE_MIN (PRICE)0 #define CHANGE PRICE // Difference of two prices. #define INDEX uint // Zero based. #define INV_INDEX UINT_MAX #define COUNT uint // One based. #define INV_COUNT UINT_MAX #define MONEY double #define SYMBOL string
Because MetaQuotes didn't code it that way. Define your own
I asked ServiceDesk. Here is their's answer:
No other aplications
Then they should update their documentation which clearly states otherwise. Nothing unusual, who cares about the documentation anyway :-d
Thanks for the feedback.
I'm learning mql5 with documentation.
I tried exactly what you did for practicing but It's not working.
They should remove that explanation in official documentation!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
According to documentation of MQL5 (https://www.mql5.com/en/docs/basis/types/typedef) is possible to create new types of variables, as well as the standard definitions of C.
So, if I use something like:
It suppose to work well, but I getting this error:
This kind of implementation should works?
Thanks