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
pointer to a piece of data of size 4 or 8 bytes.
The size depends on the platform because of the alignment. If you use something like pragma pack 1, the size will be the same (1 byte probably)
I also sometimes look in VS C++, compile in asm listing mode and then look at it, a lot becomes clear. Yes, it sounds scary, but asm is the absolute truth in the last resort. And the language isn't difficult to understand. It's hard to write it correctly))
Yes, thank you... as they say, I knew but forgot as I'm not a programmer and rarely do it :)
I want to port this source code to MQL, but I'm not sure if I can handle std::deque.
taken from here:https://habr.com/ru/sandbox/43916/
SZZY: googled and did not find any other Hamming source code, links to other sources are welcome (not the Hopfield network!!! - google always gives them together)
I want to port this source code to MQL, but I'm not sure if I can handle std::deque.
it's a bidirectional list. the above code only has push_back so chances are you can replace it with a vector.
if not, you can make a simple implementation of deque via array with a reserve from the beginning and end. in STL it is somehow implemented that way.
this is a bidirectional list. in the above code there is only push_back so there is a chance that it can be replaced by a vector.
If not, you can make a simple implementation of deque through array with start and end redundancy.
I googled std::deque and it is as you write, but... I don't know how to use it, and just replace it with a vector... In general, the example is a tutorial, I would not want to mess up and be sure it's the way it's supposed to work wrong ))))
ZS: There's also an example in F# - but I think it's too much ;)
I want to port this source code to MQL, but I'm not sure if I can handle std::Alert( n.recognizeImage( a1_3 ) );
taken from here:https://habr.com/ru/sandbox/43916/
HZZ: googled, that I did not find on the fly other Hamming network sources, links to other sources are also welcome (it is not net Hopfield!!! - google always gives them together)
Igor, I do not think it is reasonable to write a deque, a vector will suffice in the vast majority of cases. I rewrote your example using a vector from the thread about stl:
I don't want to screw up and be sure it should work improperly ))))
To check this, I've tested the source code and µl code
in both cases got: 1 1 0 4294967295
HH: by the way, there seemed to be a mistake in the source - going outside the array boundaries (the comrade forgot to add -1)
Igor, I don't think it's reasonable to write a deque, a vector is enough in the vast majority of cases. I rewrote your example using vector from the thread about stl:
To check it, I've run on pluses source and µl code like
in both cases got: 1 1 0 4294967295
HH: by the way, in the source code seemed to be an error - overrun array (comrade forgot to add -1)
О! That was so fast! Thanks HUMAN!!!