Click here to Skip to main content
16,008,469 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cfile question Pin
Tim Smith12-Jun-02 15:50
Tim Smith12-Jun-02 15:50 
GeneralRe: cfile question Pin
Christian Graus12-Jun-02 17:39
protectorChristian Graus12-Jun-02 17:39 
GeneralRe: cfile question Pin
Tim Smith12-Jun-02 15:48
Tim Smith12-Jun-02 15:48 
GeneralRe: cfile question Pin
jafrazee12-Jun-02 17:21
jafrazee12-Jun-02 17:21 
GeneralLocal IP address Pin
ed987112-Jun-02 12:13
ed987112-Jun-02 12:13 
GeneralRe: Local IP address Pin
JohnnyG12-Jun-02 13:31
JohnnyG12-Jun-02 13:31 
GeneralRe: Local IP address Pin
JohnnyG12-Jun-02 13:34
JohnnyG12-Jun-02 13:34 
Generalmap or list? You decide! Pin
moredip12-Jun-02 12:04
moredip12-Jun-02 12:04 
Howdy all,

So I'm trying to decide which STL container would be more appropriate, a multimap or a list. What I need is a storage class which will be holding a lot of objects (maybe 2000?). Each object will have a unique ID. Every time an object is added it's ID will be one larger than the previously added object. Objects will be accessed and removed pretty much at random.

So basically, objects are always added with an incremented ID, but are accessed and removed randomly, in terms of ID.

Now the fact that the object ID is always increasing make me consider a list ordered on ID, so that I could just shove new objects onto the tail without having to look at the storage.

The fact that the objects are random accessed makes me lean towards a multimap<obj_id, object>.

Oh, and it looks like once the storage is initially filled it will stay /fairly/ constant in size, i.e. addition and removals will be fairly even in number.

The main concern here is speed of access, with speed of insertion/removal second, and memory usage a fairly distant third.

Anyone have any insights, suggestions, comments, etc for me Smile | :)

TIA,

Pete
GeneralRe: map or list? You decide! Pin
12-Jun-02 12:13
suss12-Jun-02 12:13 
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:15
moredip12-Jun-02 12:15 
GeneralRe: map or list? You decide! Pin
Tim Smith12-Jun-02 12:25
Tim Smith12-Jun-02 12:25 
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:39
moredip12-Jun-02 12:39 
GeneralRe: map or list? You decide! Pin
Alexandru Savescu13-Jun-02 6:01
Alexandru Savescu13-Jun-02 6:01 
GeneralRe: map or list? You decide! Pin
soptest12-Jun-02 12:32
soptest12-Jun-02 12:32 
QuestionIs there a way to read a given sector on a harddrive? Pin
redeemer12-Jun-02 10:52
redeemer12-Jun-02 10:52 
AnswerRe: Is there a way to read a given sector on a harddrive? Pin
12-Jun-02 11:17
suss12-Jun-02 11:17 
Generaldetermination of file type Pin
12-Jun-02 10:29
suss12-Jun-02 10:29 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 10:48
redeemer12-Jun-02 10:48 
GeneralRe: determination of file type Pin
12-Jun-02 10:53
suss12-Jun-02 10:53 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:00
redeemer12-Jun-02 11:00 
GeneralRe: determination of file type Pin
12-Jun-02 11:05
suss12-Jun-02 11:05 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:32
redeemer12-Jun-02 11:32 
GeneralRe: determination of file type Pin
Roger Wright12-Jun-02 13:25
professionalRoger Wright12-Jun-02 13:25 
GeneralRe: determination of file type Pin
Matt Gullett12-Jun-02 13:46
Matt Gullett12-Jun-02 13:46 
General10x Pin
12-Jun-02 14:07
suss12-Jun-02 14:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.