Errors, bugs, questions - page 2467
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
For the first time I tried to make a wrapper class for a two-dimensional array, but I couldn't overload [] to treat it as a normal two-dimensional array arr[1][2]
Such a problem was solved 4-5 years ago, there was a separate branch with ready-made solutions.
Few of the active participants survived to this day, most of them were outbanned...
P.s. It was not a two-dimensional array, but a three-dimensional array on classes.
Such a problem was solved 4-5 years ago, there was a separate branch with ready-made solutions.
Of the active participants, few have survived to this day, most were re-banned...
P.s. It was not a two-dimensional array, but a three-dimensional array on classes.
Well, I went and looked in that thread - there's not a single account that's been banned or deleted. All of the people in that branch are there, and still alive.
Is that how you decided to create a scandal, throwing it at the administration? It's silly, isn't it? Stop seeing evil around here.
Oh, I think I found that branchhttps://www.mql5.com/ru/forum/6729
I think I read this thread last month, I'll look again tonight
but my experiments with overloading [][] ended in realizing that I can implement either L-value or R-value in MQL using overloading [][].
If you have a complete solution for a dynamic two-dimensional array - put it in CodeBase, it's a useful thing - I've looked no better than CMatrixDouble from MT: #include Math Alglib
What is the difference between //1 and //2 ?
Unfortunately, this problem cannot be avoided when using templates in containers with an arbitrary data type.
As a special case, to solve the problem, we can implement inheritance, define a copy constructor for the parent class and replace the return type in the problem function from the base to the parent.
Please add a function which returns an array's Capacity (the number of elements for which space is reserved in memory). Not to be confused with reserve parameter for ArrayResize.
There isStringBufferLen for string but nothingfor array.
Forum on trading, automated trading systems and trading strategy testing
Bugs, bugs, questions
Sergey Dzyublik, 2019.05.22 16:01
Thanks again toTheXpert for providing the code.We have the following results on ArrayResize capacity MT5(build 2057):
Result:
Good evening!
Can anyone tell me what's going on?
This is the first time I've seen this happen. Simple code in one of the functions.
Result:
"2019.05.21 19:38:29.364 2019.04.01 00:05:00 test yyyy=0.0"
Good evening!
Can anyone tell me what's going on?
int(28) / int(50) * int(100) == int(0) * int(100) == int(0) == double(0.0)
Use a full stop to specify the type double:
Please also provide pseudocode for using reserve_size parameter in ArrayResize.
There is no description of how the system behaves when a new reserve_size value is set for next ArrayResize.
Is the following assumption correct when calling sequentially:
The pseudocode they once gave in this thread, look it up. As far as I remember, capacity is increased there only when the array size exceeds this capacity. Though of course something could have changed.
And the function of getting the value of a saracity is really very useful.