But all I have to say is: the STL sucks fat penis.
2. Category class will contain an STL string for its name, an STL multiset of Item sorted by location, and an STL multimap of set Iterators with keys based on the corresponding Item’s price.
So Item looks like:
class Item {
int price;
string location;
string description;
};
Not sure what to think of Category, though. I get the first two things.
class Category {
string name;
multiset<Item> items;
// ???
};
But "an STL multimap of set Iterators with keys based on the corresponding Item’s price."
I have like, 0 idea how to envision that in my head.
Perhaps something like:
multimap<int, set<Item>::iterator> more_items;
I just have no idea what the hell is being asked for there. I can't imagine that data structure in my head. Fuck the STL.
Any thoughts?
EDIT -- Here's why I'm confused: as far as I know, an iterator just iterates over its container's type. If I have a set iterator, it needs an iterator to go over. Why would I have a multimap full of random iterators? Don't those iterators need a set to associate with? I'm confused. Bah!