A bit of binary I/O

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Sat Jan 20 15:54:49 PST 2007


> I get it, but if i'm actually writing the address of my data and not the data itself then why i'm able to retrieve the data even if it's not there? 

Hehe, this works because the string is still in memory. And then you
read back the pointer address from the file, and overwrite the other
array data ptr with it. Now s2 points to the data of s.

If you do the read in a second program run, it will probably not work.


More information about the Digitalmars-d-learn mailing list