Errors, bugs, questions - page 2327
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
Why hasn't MQL fixed the bug that a base class is implicitly cast to a derived class? Not even a compiler warning!
It must be because of this correct construct
was not taken into account.
Probably because of this correct design
has failed to take yours into account.
It is exactly the same incorrect construction.
If there is a derived class object behind a pointer to a base class, that's a great construction.
If there is a derived class object behind the pointer to the base class, this is a great design.
I suggest not to argue, but just believe me that it is a mistake.
This verb is weakly applicable in a technical forum. Tried C++.
None of the options worked. The reasons are not clear.
If you make them interchangeable, then they are both just unnecessary.
In C++, this is possible:
I suggested the simplest variant which could be implemented tomorrow (not in 10 years) and would have an external resemblance 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->() would be suddenly implemented (they are of the same order).
Why hasn't MQL fixed the bug that a base class is implicitly cast to a derived class? Not even a compiler warning!
Are you waiting for a compilation error? There shouldn't be one, because in this case it's dynamic_cast
See above, fxsaber provided the C++ code.
compiled by
compiled by