Sunfire:
I have this code to a structure containing dynamic arrays from a file. How do I read the array of struture? Thank you
Hello , you do the same for the read section
void read(int h){ zero=(int)FileReadInteger(h); int total=(int)FileReadInteger(h); if(total>0){ ArrayResize(one,total,0); for(int i=0;i<total;i++){one[i]=(int)FileReadInteger(h);} }else{ArrayFree(one);} total=(int)FileReadInteger(h); if(total>0){ ArrayResize(two,total,0); for(int i=0;i<total;i++){two[i]=(int)FileReadInteger(h);} }else{ArrayFree(two);} }
Sunfire #:
One last request of help, how to open read and write?
into a bin file.
I have requested to add you as friend, interested in your product.
I have requested to add you as friend, interested in your product.
For strings i use a custom class , its handy because i can call reset , load , save and i dont have to care.
Other than that , you can turn the string to a char array , get the length of the array , store the total and then each char as you do with the other arrays.
Im attaching the custom class in case you want to use it .
Files:
userTextVar.mqh
2 kb
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
I have this code to a structure containing dynamic arrays from a file. How do I read the array of struture? Thank you