Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 9th, 2006, 12:44 AM   #1
jayme
Professional Programmer
 
jayme's Avatar
 
Join Date: Nov 2005
Location: Canada
Posts: 495
Rep Power: 0 jayme is an unknown quantity at this point
Send a message via MSN to jayme
Linked lists+networking

I've been reading about linked lists quite a bit and understand it's used for storing information in a "chain". I was wondering, if I made a struct for a server I'm programming, then used the struct data to contain usernames, ips, and anything else I would need to keep as user info, would I be able to use a linked list in order to keep "tabs" on all the users and deal with them individually in a sophisticated manner? That includes kicking, muting, whispering, etc. It seems possible to me, because I just learned about linked lists tonight, but I'm not 100% and don't want to go ahead with it and find out it doesn't work. Thanks.
__________________

Quote:
Originally Posted by Mohamed Jihad
Durka durka!
Due to incorrect calculations during the middle ages, our calendar actually begins a few years after Jesus' birth. Thus the real 6/6/6 happened a few years back. The world already ended and you missed it.

Download Code::Blocks now!
jayme is offline   Reply With Quote
Old Apr 9th, 2006, 2:03 AM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 766
Rep Power: 3 Jimbo is on a distinguished road
Linked lists would probably be a poor choice, because the time to access a given index is O(n), where n is the index. So just finding the user you want to deal with could be time consuming in istelf, much less whatever you do with them. A hash table or an array/vector would probably be a better choice, since the lookup time is nearly constant.
Jimbo is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:06 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC