Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Linked Lists

Started by JeJu Mar 8, 2001 at 7:39 AM 0 replies 900+ views
Original Post
JeJu
JeJu
Hello I have a problem with link lists. This is my code to initialize the LLs. for(f=b;f;f=f->next) { Now it loops until I break with some condition } The result looks like this ??!f!?? f = f->next f=f->next->next etc. Now at the end of the loop f has the value f->next.... .What I want to ask is how can i get it to store only the first ??!f!?? in another variable?
manutd
manutd
Im not entierly sure what you mean but I''ll have a go...

break after the first loop...
you do realise why it is looping for ever don''t you?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.