Errors, bugs, questions - page 2328
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
You're not paying attention.
Or you. Let's get right to the point.
I offered the simplest variant that could be implemented tomorrow (not in 10 years) and would be similar to C++ (otherwise why change anything at all). Moreover, if operator*() is not and will not be implemented (there was information about it on the forum), it is unclear why operator->() suddenly would be implemented (they are of the same order).
It is not needed in this form tomorrow or in 10 years. And you don't need external similarity, you need features.
To at least partially port STL from C++. It is not only operator-> that is at stake here, we need much more.
operator-> would be the first step towards smart pointers.
In fact, all is not well with implicit cast as it is now.
You can see that dynamic cast is included in the implicit cast
BUT
first, we don't know why it's included when dynamic cast is explicitly present in the language.
secondly it is included very badly because dynamic cast error in case of function can be controlled (bad pointer output) but implicit cast cannot! because it throws an uncontrollable exception
2018.11.23 20:31:47.348 test (AUDNZD,M5) incorrect casting of pointers in 'test.mq5' (17,11)
It has no effect.
You either have to give an invalid pointer as a function, or exclude dynamic cast from the implicit cast and give a compilation error.
Yes, with this problem, working with OOP is poorly controlled and unreliable. Somewhere you change the type in one place of the program, and then it explodes in who knows where. In these examples, you can somehow get away with using crutches, because there is simple pointer assignment, and everything is in front of you. But in general, when a pointer is passed to some function and dynamically casts to something unknown, you have no way to control it.
A point is a universal operator in MQL.
That depends on how you look at it. You can say it's universal: it works with both objects and pointers.
Or you can say that . works only with objects, and it works with pointers only insofar as the pointer is implicitly cast to the object, i.e. in the case of
entry
is equivalent to not
a
there is this structure
there is a variable OrdersInfo order, when I try to write it into a file
the compiler gives out: 'order' - structures containing objects are not allowed
What could be the problem?
there is this structure
there is a variable OrdersInfo order, when I try to write it into a file
the compiler gives out: 'order' - structures containing objects are not allowed
What could be the problem?
Here
https://www.mql5.com/ru/docs/files/filewritestruct
lists the restrictions.
MT4 on UPU traffic is negative, downloaded history counter started to increase ...