View Single Post
Old 07-01-2004, 11:48 PM   #1 (permalink)
IAmWeasel
Registered User
 
IAmWeasel's Avatar
 
Join Date: Jul 2004
Posts: 1
IAmWeasel is on a distinguished road
Send a message via Yahoo to IAmWeasel
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
IAmWeasel is offline   Reply With Quote