V
Vince
Hi,
I would like to know how can I build a structure or an object to quickly
reference the following information :
I need to associate a unique identifier with a list of records
ex :
----------
id: 0x17 |
rec:1,2,3 |
----------
----------
id: 0x18 |
rec:2 |
----------
or maybe it is faster to have a list and to do that
----------
id: 0x17 |
rec:1 |
----------
----------
id: 0x17 |
rec:2 |
----------
----------
id: 0x17 |
rec:3 |
----------
----------
id: 0x18 |
rec:2 |
----------
What kind of container would you use ?
And I would like to be able to write: obj.AddItem(id, rec);//This method
add a new id,rec if it doesn't already exist.
I was thinking of this : map<int, list<int> updateList;
Sorry for this newbie question.
I would like to know how can I build a structure or an object to quickly
reference the following information :
I need to associate a unique identifier with a list of records
ex :
----------
id: 0x17 |
rec:1,2,3 |
----------
----------
id: 0x18 |
rec:2 |
----------
or maybe it is faster to have a list and to do that
----------
id: 0x17 |
rec:1 |
----------
----------
id: 0x17 |
rec:2 |
----------
----------
id: 0x17 |
rec:3 |
----------
----------
id: 0x18 |
rec:2 |
----------
What kind of container would you use ?
And I would like to be able to write: obj.AddItem(id, rec);//This method
add a new id,rec if it doesn't already exist.
I was thinking of this : map<int, list<int> updateList;
Sorry for this newbie question.