|
-
January 11th, 2003, 03:45 PM
#1
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
-
January 11th, 2003, 03:53 PM
#2
GetFileAttributes()?
i dont really understand what you mean about get info from the file.
-
January 12th, 2003, 01:35 PM
#3
Consider outputting the entire container to a file in binary mode. Reading it back is the same.
Kuphryn
-
January 12th, 2003, 04:30 PM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|