Resource File Accessing
Lionello Lunesu
lionello at lunesu.remove.com
Sun Dec 28 20:42:26 PST 2008
--snip--
>>> All you have to do is pass the -J flag to DMD to indicate the path
>>> where filename.dat lives. import() returns a string (a char[]) but
>>> you can cast it to whatever type you want, like I've casted to byte[]
>>> here. :)
>>
>> That's pretty much the cleanest solution there is.
>
> Please allow me to grab credit for that one :o).
But shouldn't it return a void[] or byte[] by default? If it's known to be
UTF8, then it can be cast to char[] explicitely.
L.
More information about the Digitalmars-d
mailing list