Board index » delphi » Record Link List Help please

Record Link List Help please

I am writing a program to stor info in a link list and have no problems
with the linked list but have trouble transferring the list from memory to
a file. Could soemone plz post how to do this. Muchly Appreciated.

Thanks

 

Re:Record Link List Help please


In article <01bd996c$56833900$702125cb@speed-demon>,
  "immortal" <immorta...@hotmail.com> wrote:

Quote
> I am writing a program to stor info in a link list and have no problems
> with the linked list but have trouble transferring the list from memory to
> a file. Could soemone plz post how to do this. Muchly Appreciated.

Write each record into the file. Don't care about any pointers in your record.
They become invalid once you have deleted your list from memory.

When reading the file read each record and add it to a fresh, empty list. At
this point you have to update your pointers (next, previous) in your records !

Ever considered using objects (like TCollection and TStream) for this job ?

Tom.
--
Tom Wellige
http://wellige.home.ml.org

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Other Threads