No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Is hash_map same as map? How can i use it in dev C++??? Is there any tutorial ?? thank you so much. |
|
I have to redesign a bookshop programme which allow user to make order of books. This programme is originally using vector to implement.Now i have to decide either use deque or hash_map for the programme or i would better keep using vector?? In fact, I just know these three kinds … |
|
class Order { private: vector<OrderItem> items; public: // Constructor Order() {} // accessors OrderItem operator[](int index) const { return items[index]; } // mutators [COLOR=red]OrderItem& [/COLOR]operator[](int index) { return items[index]; } in this programme the accessors seems useless,and what is the use of the operator "&" in the mutator? |