"BGreene" <> writes:
> Has nothing to do with C
> "Alexander Hunziker" <> wrote in message
> news: ...
>> Hello everybody,
>>
>> I'm trying to program a linked list, but unfortunately it segfaults when
>> I run the program. The code is basically the same as one can find in
>> several places in the internet. With gdb I found out, that my root->next
>> points to some strange memory area instead of where it should.
[...]
First, please don't top-post.
Second, what makes you think the question has nothing to do with C?
Third, we answered the OP's question several days ago (the problem was
an incorrect argument to malloc()).
--
Keith Thompson (The_Other_Keith)
kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.