DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005
    Posts
    5

    wrong output from binary search tree!!!!!!!!!

    Hi
    Ihave constructed a binary search tree and then insert it following four items. then I want to print tree in preorder form. in my output file there is extra things as below.
    for example
    i want this
    int float mytype itisatype
    but output is
    int float mytype itisatype 0xbffff8ac
    why do I have these extra characters?

    if there is someone who has any idea about this problem ,please help me.

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    Your traversal is outputting 5 times - one appears to be a memory address. Can't do much debugging without code ... have you actually added 5 nodes? is your preorder traversal printing five times instead of four?

Similar Threads

  1. Replies: 4
    Last Post: 12-05-2005, 06:58 PM
  2. Binary Tree Help
    By TheJVM_1970 in forum Java
    Replies: 2
    Last Post: 12-05-2005, 12:23 AM
  3. Serialization in Binary Tree
    By diva_thilak in forum Java
    Replies: 0
    Last Post: 02-21-2005, 03:47 AM
  4. Binary Search Tree implementation
    By Liza in forum Java
    Replies: 0
    Last Post: 10-23-2001, 11:21 AM
  5. Binary Search trees
    By Tom in forum Java
    Replies: 0
    Last Post: 12-02-2000, 12:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links