Thread: AVL tree balancing problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    94
    I am sending the tree an object that contains information such as :

    Essendon 3040 <-- This line is used as the key
    27234

    Essendon North 3041
    27235

    Essendon West 3040
    27236

    Eureka 3350
    27237

    Euroa 3666
    27238

    Eurobin 3739
    27239

    Evansford 3371
    27240

    Everton 3678
    27241

    Exford 3338
    27242

    The overloaded operator the tree is using is as follows:

    Code:
    int Dictionary::operator<(const Dictionary& diction)const
    {
    	return (_strnicmp(key, diction.key, strlen(diction.key))< 0); 
    }
    The tree works fine if the key is only numbers...but crashes otherwise.
    simple is always an understatement.....

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    127
    Still nothing. It works with a tree of up to one million items in the short tests I ran. I'm sorry, but I can't help very much if I can't reproduce the problem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Balancing A Binary Tree
    By mike_g in forum C Programming
    Replies: 5
    Last Post: 08-12-2008, 04:01 PM
  2. BST delete again, but this time I think I'm close
    By tms43 in forum C++ Programming
    Replies: 9
    Last Post: 11-05-2006, 06:24 PM
  3. binary tree token problem
    By OldSchool in forum C++ Programming
    Replies: 13
    Last Post: 05-28-2006, 10:42 PM
  4. searching and insertion in a binary search tree
    By galmca in forum C Programming
    Replies: 1
    Last Post: 03-26-2005, 05:15 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM