MAD:
output:
20 characters copied to the static array u[6]
contents of u[6] array: string to be copied
0 characters copied to the array inside the s1 structure
contents of the array inside s1:
Question 1: Why and how it copies 20 elements into a 6 element static array?
Question 2: Why the same does not happen when the target array is inside a struct?
Unlike MT5, MT4 resizes static arrays(which is what StringToShortArray() does) , with the exception of class and struct members.
struct s { int i; ushort u[]; double d; };
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
output:
20 characters copied to the static array u[6]
contents of u[6] array: string to be copied
0 characters copied to the array inside the s1 structure
contents of the array inside s1:
Question 1: Why and how it copies 20 elements into a 6 element static array?
Question 2: Why the same does not happen when the target array is inside a struct?