1

I have a struct "Order" which consists

string name,item;
int qty, highest price, duration;

qty is the amount they wish to buy, highest price is the highest price willing to pay, and duration is how long they will keep this order open for. How would I go about make an unordered_map for this ? I'm assuming I need to write a custom hash function which allows for searching?

Yakk - Adam Nevraumont
  • 262,606
  • 27
  • 330
  • 524
GoBlue_MathMan
  • 1,048
  • 2
  • 13
  • 20
  • 1
    the answer is: "yes". is that all you wanted to know? At least do a google search, and click on the first hit.. seriously. – Karoly Horvath Nov 01 '13 at 17:10
  • 1
    An "unordered map" implies that you have a specific key, what is the key in your case? If you don't want an associative container (key->value), then you may want an "unordered set" instead. – Chad Nov 01 '13 at 17:12

0 Answers0