I'd use an array. It actually uses less memory than a linked list of the same size, and since you have a fixed size, I don't see any reason not to use an array. Though I don't think either one would use a substantial amount of memory. The biggest problem I see is invisible players. But I guess you've already decided how to handle that, since you say you've been working on it.
On Thursday 07 August 2003 09:37 am, Robin Björklund wrote: > Greetings, > > I'm currently trying to code something that'll store the last 20 > tells/gossips/whatever more channel we want. > This history should be viewable through a command let's call it history. > Syntax would be: history <channel> > Anyway I first did this with arrays but I was told that it consumed lots of > memory I was also told to take a > look at linked lists. I've been taking a look at them for the last 3 hours. > Though, linked lists doesn't have a > size it seems, they keep growing, what would I do to make them just list > the *last* 20 tells or last 20 > gossips. Would I remove the first node once I hit 21 nodes? Would I list > the last 20 nodes? wouldn't that > list be huge if I don't remove a node once I hit 21. Is there anyway to > give a linked list a fixed size? Or > am I just dreaming...

