No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hi guys, The following code doesn't compile, and I've been banging my head why. Some header code: [code] template <typename T, typename LESS_THAN> class RestrictedSet { private : int _size; int _max_size; set<T, LESS_THAN> _S; typedef typename std::set<T, LESS_THAN>::iterator tIt; public : RestrictedSet (int max_size); RestrictedSet (RestrictedSet<T, LESS_THAN> &other); ~RestrictedSet … |
|
Hi guys, I am looking for an STL solution for the following problem. The desired behaviour is the following: - It should act as a priority queue - When an item is added, the item with the *lowest* priority should be dropped. I thought of doing that by making a … |