Errors, bugs, questions - page 2364

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
it is all clear, and it is not a small difference, I will say that the code of professional programmer differs from amateur one exactly in this difference - in check of critical errors ..... Although with modern trends in programming languages it has simplified for lamer programmers usingtry except finally and so on ;)
Actually Try/Catch is a more interesting topic than it may seem:) Too bad it's not in MQL.
Who can tell me what it's fighting about and what to do about it?
Imho, MQL is more like a very stripped down C# with complete lack of syntax sugar.
Ok, I've never had any desire or opportunity to play around with C#, I've opened VS2017 a couple of times, at C++ level and tried to write in Delphi, so far I haven't understood it - I will definitely take a closer look at C# now
Who can tell me what it frowns on and what to do about it?
I don't know if it helps you, but in MQL the structures are not exactly the same as classes, as Vasiliy mentioned above, MQL is a bit like C# - there they create static memory structures, and classes are kind of in the heap
I was looking for a solution through the description of the structure, but was told to "wrap" it in classeshttps://www.mql5.com/ru/forum/6343/page866#comment_7541747.
maybe your example will work in a class?
would your example work in class?
No, it doesn't depend on that. This is a mating dance of templates with statics.
Service desk pay attention to the application
Open,Started: 2018.12.17 14:19,#2224434
Who can tell me what it's fighting about and what to do about it?
Write the body of the method inside the class.
Write a method body inside a class.
How to make it work, I've already figured it out myself. The question is about the reasons for the error, why you can't write it the way it is written, in terms of logic and common sense
I've already figured out how to make it work myself. The question is about the reasons for the error, why it cannot be written exactly the way it is written, in terms of logic and common sense
By the way, it's not the only error. The compiler also does not allow you to address the static field k with A<T>::k