Advertisement

Linked lists...

Started by May 22, 2000 06:27 PM
17 comments, last by Kavos 24 years, 7 months ago
Where can I find some good info about linked lists, how they work, how to implemetn them, ect. Thanks. ~Kavos
Hey Kavos,

Linked lists used to give me a bad taste, not because they stink (they''re actually great!), but because I first learned about these things on school (I know bad word, sorry ).

Sorry, I don''t know any good links to this stuff.
I could give a uge explanation of LL''s, but good tutorials can probably do it much better!
There''ll probably be someone who knows...

You didn''t ask for it, so here''s my implementation advice:
- Use cyclic list! -
This way you don''t have to mess with tons of NULL pointer compares and stuff! (The last node points to a legal begin node instead of NULL)

What are you using the list for anyway?
Advertisement
Well the "plan" is to use it to keep track of windows and thier children in my GUI. To draw them I just run down the list.

~Kavos
Have you tried the EnumWindows and the EnumWindowProc Win32 functions?
I''m making my own GUI, I''m not using the windows one.

~Kavos
Are you using a:
- Single linked list
- Double linked list
- (Binary) Tree
- in combination with the cyclic?

May I ask why you''re writing your own GUI?
Is is for DOS/Linux orso?
Advertisement
Well I'm making my own GUI for my game quite frankly becuase if I use the Windows one it will look like crap

Probably a tree, and uhh heh, whats a cyclic?

~Kavos





Edited by - Kavos on May 22, 2000 10:26:38 PM
I hope a good idea:

You can use normal Windows - Goto fullscreen - and just give them another look. Just add some bitmaps to the windows, use bitmaps for the buttons...etc...
This may seem a bit stupid, but it''s easy and you don''t have to rewrite all window functions!

(I don''t know if I''m using the right English here: "cyclic")
When using a cyclic list, your list will be like a circle!
The last node will point to the first again. This way avoiding a lot of NULL pointers. This may seem like overdoing it: but implementation will prove it''s a lot easier.

But then again - Cyclic isn''t for trees...
any good book on data structures will give you linked lists...

Maybe check into the STL?

40

www.databyss.com
www.omlettesoft.com

"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
-40
I think that "cyclic" is the same as DOUBLY LINKED LIST

Lets see if I can draw this

Linked List
[head]->[item1]->[tail]->[NULL] 

Doubly Linked List
[head]->[item1]->[tail]->-+  ^                       /  +-----------------------+ 



So... in summary, I think Cyclic == Doubly Linked List


David "Dak Lozar" Loeser
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous

This topic is closed to new replies.

Advertisement