|
Implementing C++ file structure in C#
Hi! I have been going over this problem for a week already and i was not successful with it. I have this data files implemented and defined by C++'s file structure in this format;
typedef struct {
unsigned int var1[128];
unsigned int var2;
char var3;
long time;
} firstStruct;
typedef {
unsigned int var4;
unsigned int var5[128];
unsigned int var6[128][2];
firstStruct var7[3];
long time;
} secondStruct;
I am going to convert this to C# and read/write a file by using this structure. It would be helpful if you can give me a sample on how to read and write to a file using this structure.
Since a file has already been created via C++ i tried reading the file using the idea of pe666o on the forum topic C# and advanced binary files but unfortunately i was unsuccessful with it.
Thank you very much in advance!
Best Regards,
IAmWeasel
|