-
March 24th, 2004, 04:45 AM
#1
what stl data structure to use
Hello,
I'm having diffculties to find the right data structure for me
I have a structure with 5 fields
lets say
struct myStruct
{
int iField1;
int iField2;
int iField3;
int iField4;
string sField5;
};
I need some kind of data structure that will hold unknown numbers of elements of myStruct
and I need to have each fields as a key field
If I have only 1 field as the key
I would have used hash_map
for example if the key is iField1
then I would have used hash_map with int as key and with myStruct as the data
I need to be able to have 5 keys (and return the correct element according to 1 of them, meaning the key is not combination of them, but each one of them should be able to retrive the correct element)
Thanks
avi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|