write struct as raw data to file
Paul
phshaffer at gmail.com
Sun Sep 26 21:29:57 UTC 2021
Hmm...well this is what I did and sort of got what I wanted; it
did compile and write data!
auto myStruct = new mystruct[1];
File f = File("myFile.wav", "wb");
f.rawWrite(myStruct); //this is 44 bytes
f.rawWrite(shortWaveArray);
What I got in the file was this:
-my 44 byte myStruct data + (4 bytes of zero)!
-then, my shortWaveArray data
What's with the 4 bytes of zero?
Thanks
More information about the Digitalmars-d-learn
mailing list