Write struct to file
Andrej Mitrovic
andrej.mitrovich at gmail.com
Sat Feb 25 15:00:54 PST 2012
On 2/25/12, Ali Çehreli <acehreli at yahoo.com> wrote:
> But there is no way for fwrite to follow name.ptr to also write the
> characters that are in the string, right?
Oh my I just got a big fat zero on the finals. You're absolutely
right, what gets copied is the length and the pointer. The only reason
my last sample worked is because the memory for the strings was
allocated on the stack, which had the same address between runs.
More information about the Digitalmars-d-learn
mailing list