delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/30/07:30:23

From: "Jeff Dewhurst" <jeffd AT xtra DOT co DOT nz>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linked lists
Date: Mon, 30 Mar 1998 14:58:34 +1200
Organization: Customer of Telecom Internet Services
Lines: 30
Message-ID: <6fn1hn$hio$1@wolfman.xtra.co.nz>
References: <3 DOT 0 DOT 5 DOT 32 DOT 19980329185251 DOT 007a4430 AT vip DOT cybercity DOT dk>
NNTP-Posting-Host: p47-m3-pm4.dialup.xtra.co.nz
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nils Emil P. Larsen wrote in message
<3 DOT 0 DOT 5 DOT 32 DOT 19980329185251 DOT 007a4430 AT vip DOT cybercity DOT dk>...
>Hi!
>
>Can anyone show me (or tell me where to find) a good example of practical
>using of linked lists? I really don't understand what they a for, but I
>think they are important!
>
>Thank you very much!
>Nils Emil P. Larsen


It's my interpretation that linked lists are good for storing dynamic data.

This is to say instead of creating an array of size 50 and maybe only using
its full storage capacity for a few seconds, use a linked list.

As you add items to the list, new nodes (boxes to hold your data) are
created (allocated from memory).
This approach wastes a lot less memory.

I know this isn't rec.games.programmer but I'm going to use linked lists to
hold the units created so far, in my game.

It may be wise to check out a book on data structures,
alialx - "all life is a learning experience"
Jeff


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019