Posted by kalpol on July 13, 2001 at 13:45:59:
In Reply to: can you give an advice? posted by MARINA on July 13, 2001 at 13:14:48:
:
: Hey, Alan.
: Thanks for explanations. One question:
: is it efficient to have an array/list/whatever for orders, where each element would be a pair of a pointer and a value? That's the only solution I have in mind. But then I would have at least 2 structures in total(map and array). That's already bad, isn't it?
: Also we have to keep track of time, to make a decision which foo to delete later, when we run out of space. So the question is: do we need another list/array/whatever to associate the time stamp with each ever accessed foo?
: Or may be we should make it more beautiful, for example create an additional class, where we would store all this sh-t?
: I'm a little bit lost.... Can't make a right decision. Please, give an advice...
: Marina.
I'm making foo storage objects, with all that information as data members, and just putting them in the STL list for now. they're indexed by initializer - so when a process asks for a foo i have to search through the list until i find the right one, and then i can manipulate all the data fields. slow but works. i hope i'm understanding this correctly.