> The following was supposedly scribed by
> Sisyphus
> on Saturday 24 January 2004 01:22 am:

>That almost makes sense to me ... which is a worry :-)
>Anyway, the important thing is that the change works also for me.

I'm just getting into the details of C myself, but when trying to manipulate 
nested Perl arrays and other data structures, you'll spend all of your time 
pulling out hair if you don't get a good understanding of pointers.

this pages seems fairly clear:
http://computer.howstuffworks.com/c9.htm

An uninitialized pointer points to something random (just like an 
uninitialized integer usually contains garbage.)  Although I'm sure that the 
memory manager draws a line between the two, assume that the random address 
stored in the pointer is aimed at your operating system kernel.  Storing 
something into that address means over-writing whatever unfortunate memory 
happened to be there.

When a function wants a pointer as an argument, what you are really giving it 
is a memory address.  With sv_gets(), that address is used as the starting 
point for storing the line from the file.

--Eric

-- 
"Because understanding simplicity is complicated."
                                        --Eric Raymond

Reply via email to