Features of the mql5 language, subtleties and tricks - page 64

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
If you mean MQL, it has no alignment.
If you mean C++, struct B is better.
Although in any case in C++ alignment is up to the programmer.
The MQL reference also says about alignment)
but what placeholder should you use in Variant B, for 7 bytes?
You don't need any fillers.
You don't need any fillers.
Why not when it comes to leveling?
Why not when it comes to alignment?
Trust me.
Why not when it comes to alignment?
The help is all about alignment.
How does this apply to my question?
Believe me.
OK
The reference describes everything about the alignment.
Please note that in MQL5 the structure elements follow each other directly without alignment. In C++, such an instruction is given to the compiler using the
#pragmapack(1)
If you want to make another alignment in a structure, you should use auxiliary "filler" members of appropriate sizes.
Please note that in MQL5 the structure elements follow each other directly without alignment. In C++, such an instruction is given to the compiler using the
#pragmapack(1)
If you want to make another alignment in a structure, you should use auxiliary members "fillers" of required size.
Please note that in MQL5 the structure elements follow each other directly without alignment. In C++, such an instruction is given to the compiler using the
#pragmapack(1)
If a different alignment in a structure is required, auxiliary "filler" members of the required size should be used.
Alexey, what do you think should be done in my question?