What it the preferred method to write a class to a file?
Derek
derek at psyc.ward
Mon Jul 24 15:07:56 PDT 2006
On Mon, 24 Jul 2006 13:34:12 -0700, Charles D Hixson wrote:
> xs0 wrote:
>>
>>> P.S.: Is there a standard library routine for converting
>>> between strings of length 4 and uint-s? If so I wasn't able
>>> to find it. If not, I wasn't able to determine that it
>>> didn't exist. (That would have made writing the sig more
>>> efficient.)
>>
>> union {
>> uint asUInt;
>> char[4] asChars;
>> }
>>
>> or something to that effect :)
> For some reason when I tried that I was told that I was
> using "illegal utf8 characters". But Jarrett's approach
> worked fine.
How about
union {
uint asUInt;
ubyte[4] asChars;
}
Are you really using *characters* or *bytes*?
--
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"
More information about the Digitalmars-d-learn
mailing list