Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

when and where we need to consider datastructure?

Status
Not open for further replies.

Jason231

MIS
Apr 15, 2006
43
0
0
NL
hi all .i have some experiunce in datastructure and a created a few programs in visual c++ that make tree ,likelist ,quie,... i created the tree and all of those data structures probably using RAM memory ? Now my question is in real world we need to implement that in hard drive or ? If the answer is yes then how we refrence hard drive?Furthermore, do we need to consider the datastructure at what stage of production ? or windows xp will take care of that for us ? I be happy if i get some details about how this data structure works in real production environment.Thanks
 
The most comman way to make your datastructures persistant is to write them to files on disk.

/Per
[sub]
www.perfnurt.se[/sub]
 
I think he was asking about what to do with the pointers to the other elements. Ex.
Code:
template <class T>
struct LinkedListNode
{
   LinkedListNode*  previous;
   T  data;
   LinkedListNode*  next;
};
For a simple linked list like this, I would obviously just treat it like an array and write only the data in sequence in the file, but for associative containers like a Tree, I'm not sure what the best way to write them to disk would be?
 
For a multi-tree you need to save data and a linkage to parent. For binary tree it's possible to only save data. Graphs require data and vertex linkages.

But regarding Jason's post, can you please be more specific? as it's really hard to understand what you need to know...

------------------
When you do it, do it right.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top