On 02/25/2012 03:00 PM, Andrej Mitrovic wrote:
On 2/25/12, Ali Çehreli<acehr...@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.

Ha ha! :) Sorry, I wasn't clear before. That was exactly what I meant. Whenever I see objects written by &object, I hear warning bells. :)

Ali

Reply via email to