Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Implementat of B-Tree (http://www.programmingforums.org/showthread.php?t=15242)

tmac_619 Feb 22nd, 2008 8:23 PM

Implementat of B-Tree
 
I am currently working on a B-Tree implementation.
I am working on the Insert Function. I just have a quick question. When you are suppose to insert something in the tree, you have to run a search. And in order to search you need to compare objects. How are we suppose to compare..? Compare the address, pointer or any other thing ?.

Thanks,

Narue Feb 22nd, 2008 8:51 PM

Re: Implementat of B-Tree
 
Compare whatever it is you're using as a key. The order of the tree is based on that key, so you should know what it is. It could be as simple as the data item itself, or it could be a separate key, or a part of the data item.


All times are GMT -5. The time now is 4:20 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC