File I/O - rawWrite issues

Meta jared771 at gmail.com
Wed May 8 14:46:27 PDT 2013


> For example:
> ubyte[] data = [5, 34, 9, 45];
> file.rawWrite(data); // OKAY
>
> ubyte[] data = [0, 0, 0, 45];
> file.rawWrite(data); // NOT OKAY

Since ubytes are pretty much the same as chars, I think writing 0 
to the file will actually write the null character, which 
probably isn't a good thing.


More information about the Digitalmars-d-learn mailing list