I'm moving some old C code that generates a binary file into our C# system. The problem is, the resulting binary file will still need to be read by another old C program.
The original code outputs several structs to a binary file, and many of those structs contain linked lists, with *next pointers.
How can I write these in C# so that the original program will still be able to read them?
The old C code reads and writes the file a whole struct at a time, with freads and fwrites i.e.
fread ( &file, sizeof ( struct file_items ), 1, hdata.fp );
I can't find a whole lot of info on how fwrite would output the pointers, etc.
以上就是Writing a binary file in C# to be read by C program, with pointers?的详细内容，更多请关注web前端其它相关文章！