Hello everyone,
I'm not sure if this question has been asked before and if so my apologies. I tried searching online for the topic but those solutions weren't necessarily applicable to what I'm looking for. I'm working on a program for practice where I take a text file, read and parse the data into an array, then save the array to my own custom binary file. This task is tricky in most languages but a breeze in C as far as creating a struct that contains an array that can be written to or read from a binary file. But with QB when I try this code for example I get an error:
Type MyPalette
HeaderTag as String
Colors(20) As integer
End Type
For as long as I've been coding off and on in Basic and QB especially I didn't know you couldn't simply create a fixed array in a custom data. With binary files I'll typically create a data type with a header and variables where each variable in succession including large chunks of data can be organized into a contained array so I can write the entire custom data type to a binary file with one line of code. Is this even possible with QB or is there any type of workaround? I did glance at the new _MEM command but not too familiar with that either.
Thanks for reading and your input.
I'm not sure if this question has been asked before and if so my apologies. I tried searching online for the topic but those solutions weren't necessarily applicable to what I'm looking for. I'm working on a program for practice where I take a text file, read and parse the data into an array, then save the array to my own custom binary file. This task is tricky in most languages but a breeze in C as far as creating a struct that contains an array that can be written to or read from a binary file. But with QB when I try this code for example I get an error:
Type MyPalette
HeaderTag as String
Colors(20) As integer
End Type
For as long as I've been coding off and on in Basic and QB especially I didn't know you couldn't simply create a fixed array in a custom data. With binary files I'll typically create a data type with a header and variables where each variable in succession including large chunks of data can be organized into a contained array so I can write the entire custom data type to a binary file with one line of code. Is this even possible with QB or is there any type of workaround? I did glance at the new _MEM command but not too familiar with that either.
Thanks for reading and your input.