Bert Wheeler

Bert Wheeler

  • NA
  • 15
  • 5.9k

Saving a C Binary Tree

May 5 2011 10:23 AM

I am receiving a C Binary Tree as a string from a TCP Socket.  I need to dump the entire C Tree to a binary file.   I do not want to interact with the data, simply write it all to a file for another program to interact with.  I do not know the structure of the C Tree nor do I need to; I just need to write it to a file.  I have tried using File Streams, Stream Writers, Binary Writers and everything else I can think of, but as the file can contain numeric values up to 65535 I cannot load it into a byte array which seems to be the common method for storage prior to writing.


I am using C# in Visual Studio 2005.


Answers (17)