Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1200
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
Another question.
I have a structure.
I've filled it in and want to save it to a file.
FileWriteStruct(filehandle,vfann);
The compiler complains - 'vfann' - structures or classes containing objects are not allowed
Another question.
I have a structure.
I've filled it in and want to save it to a file.
The compiler complains - 'vfann' - structures or classes containing objects are not allowed
Yes, there should be no arrays.FileWriteStruct
Another question.
I have a structure.
I've filled it in and want to save it to a file.
The compiler complains - 'vfann' - structures or classes containing objects are not allowed
I understand it doesn't like arrays. How do you save this structure?
translate it into text, save it element by element.
Create a structure with a structure instead of arrays. First, each array should be packed into its own structure. Then pack the resulting structure into the resulting structure. Unpack in reverse order.
translate into text, save element by element.
Thank you.
How about this:
FILE_BIN.
Then we can read it all into the structure and arrays in the same order?
What if there are several such records?
Thank you.
How about this:
FILE_BIN.
Then you can read it all into the structure and arrays in the same order?
And if there are several such records?
Yeah, I couldn't figure out that tip on the fly, either. If you can't do it at all, you can do it that way. But it's still better to figure out how to make a structure within a structure. It is enough to ask how to do it. At the same time, I will learn something else too...
Yeah. I couldn't figure out that tip on the fly, either. If you can't do it at all, you can do it that way. But it's still better to figure out how to make a structure within a structure. It is enough to ask how to do it. At the same time, I will learn something else too.
Asking ))))
Tried to do it "my way".
The first structure and 3 arrays read fine (provided the arrays are not dynamic, otherwise the first array reads all the data written after the structure).
However, if there are more entries, it
it gives out the damn thing...
Create a structure with a structure instead of arrays. First, each array should be packed into its own structure. Then pack the resulting structure into the resulting structure. Unpack in reverse order.
Artyom, can you give me an example? Given that the size of the arrays is dynamic.
Asking ))))
Tried to do it "my way".
The first structure and 3 arrays read fine (provided the arrays receivers are not dynamic, otherwise the first array reads all the data written after the structure).
However, if there are more entries, it
it gives out the damn thing...
You are trying to write 4 different files and only open one. Sorry.... there are no decent words.
You are trying to write 4 different files and only open one. Sorry.... there are no decent words.
I write everything in one file. Writing, followed by reading, of several structures to one file goes well.