Use vector<const myStruct> to store the data.
Use map<int,const myStruct&> to store an index that points to the correct value of myStruct for each value of iField1.
Use another map for each additional index.
Adding and deleting myStructs will be some work. Updateing even more, so I recommend implementing it as delete+insert (thus the const).
And, if you can, wrap the vector and maps up in another class to make the whole thing easier to use. E.g.
void add(const myStruct& s)
// push_back to the vector, update the maps, etc.
// other functions for getting at the data
std::map<int, myStruct*> map1_;
// etc for the other maps
Correct is better than fast. Simple is better than complex. Clear is better than cute. Safe is better than insecure.
-- Sutter and Alexandrescu, C++ Coding Standards
Programs must be written for people to read, and only incidentally for machines to execute.
-- Harold Abelson and Gerald Jay Sussman
The cheapest, fastest and most reliable components of a computer system are those that aren't there. -- Gordon Bell
why would this be better than building a linked list with pointers to the next index by each field ie:
int filed1index(int i);
LInkList * myfield1next;