CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    165

    how can i load from a file information in a tree structure..

    how can i load information from a file into a tree structure.
    suppose i had save it before in a file(only the information)

    for example if i have a structure of a tree like this:

    typedef int tip;

    struct node{
    tip info;
    int ns;
    nod* son[20];
    };

    so, only the info filed i have saved if i cross the tree in depth.

    i'll b grateful to everyone who would help me.
    thanks

  2. #2
    Join Date
    Aug 2002
    Location
    United States
    Posts
    729
    GetFileAttributes()?

    i dont really understand what you mean about get info from the file.

  3. #3
    Join Date
    Feb 2002
    Posts
    5,757
    Consider outputting the entire container to a file in binary mode. Reading it back is the same.

    Kuphryn

  4. #4
    Join Date
    Jan 2003
    Posts
    165
    Originally posted by filthy_mcnasty
    GetFileAttributes()?

    i dont really understand what you mean about get info from the file.
    i ment after you work on a binary tree you save the information from that tree(the structure has a field named "info" for example,which can b a number,or a string whatever) and that information i save it before qiuting the program because i want to reconstruct the tree with that information saved from that file i was talking about.now you get the ideea .if yes maybe you can give ideeas.thks

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