CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Feb 2005
    Posts
    218

    Tree data structure

    Hi,

    I want to have something like a tree datastructure. I want to represent a tree containing integers.

    I want it to be able to easily add nodes and to easily geth the path from a leaf to the base node.
    e.g.
    Code:
               0
    1      8      6      3
          7 9      4
         2
         5
    //so it must be easy to append an new integer node on any leaf. e.g. append 10 on 5.
    //and it must be easy to give the path for a given node. e.g. for 5: 5-2-7-8-0; e.g. for 9: 9-8-0
    I can't seem to find anything on msdn. Doesn't this exist? If so, where must I look. If not, how do I start on this?

    You may also point me to sample implementations of this..

    greets
    Last edited by timv; September 14th, 2005 at 05:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured