Binary trees again!
I kept fuzzing around with binary trees and there is one thing I don''t get. I want to create a GUI for my game and want to access nodes, in my case windows (WND), and controls (Ctrl).
Now, picture this tree:
GAME
/ \
/ \
WND WND
/ \
-------- --------
/ | \ | \
Ctrl Ctrl Ctrl Ctrl Ctrl
Am I right to presume that the windows would be the nodes and the controls are the childs? If so, are the windows called siblings?
I''m a linguistic problem here :-)
Thanks! ;-)
not sure if you''re talking about win32 programming, but from your diagram, the WND''s would be parents of the children, CTRL''s.
You said you wanted to access windows and controls, so just search down the tree for the node (they are all nodes) that you want.
You said you wanted to access windows and controls, so just search down the tree for the node (they are all nodes) that you want.
___________________________Freeware development:ruinedsoft.com
That''s not a binary tree, binary trees only have two children (at most).
The WND are also called branch nodes, and the ctrl are leaf nodes, Game is the root node.
The WND are also called branch nodes, and the ctrl are leaf nodes, Game is the root node.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement