Forum Navigation
Writing a struct to a file
Posted: 11/06/07 04:07:13Hi,
I'm just about going crazy here. All I want to do is take an instance of a struct and write it to a FileConduit; sounds pretty simple, but Conduit.write() can only take void arrays. Now of course I could probably set up a new array and copy the contents of the struct into it, but that's both longwinded and inefficient. Nor do I want to implement an IWritable interface for my struct or anything esoteric like that.
Why is there no overload for Conduit.write() which simply takes a void* and a size? And what's the canonical approach to solving my problem with the minimum amount of fuss?
Thanks.