The compiler complains - 'vfann' - structures or classes containing objects are not allowed
I guess it doesn't like arrays. But how can I save this structure?
Create a structure with a structure instead of arrays. First, pack each array into its own structure. Then pack the resulting structure into the resulting structure. Unpack in reverse order.
Artyom Trishkin: 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.
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).
Artyom Trishkin: 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.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.