Errors, bugs, questions - page 1184
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
Which pointer operations are not meaningless?
This is the way it is now (overloaded as for objects) and everything seems to be fine. But there is a contradiction between the meaningful (== and !=) and the rest
as
Which we suggest to eliminate by comparing pointers only through the special function
A special function for comparing pointers can be designed as follows
I have an indiscreet question for you. Are you going to share your experiences?
You are one of the few people who actively and constantly use templates and macros. And you probably have a large amount of accumulated code.
I don't know about anyone else, but I would be very interested to see your code and your developments, if you have any, which you don't mind sharing with public.
I don't know... implementation of patterns, your wrappers for working with indicators, charts, whatever...
How do I use templates? - To shorten an entry. For example, there is no comma operation in MQL. Let's say there is a record
Then having a patterntemplate<typename T 1, typename T 2> T2 opComma( T1 expression, T2 assignment_expression ) { return ( assignment_expression ); }
instead of 4 lines we have one
How do I use macros? - Again - to shorten the record. For example, there are no class templates in MQL. Not a problem - we use a macro
it will subsequently suffice to declare
datetime dt; MDT( dt_struct, dt )
Bitwise copying, for example, is implemented through templates, since several types can be involved at once