I would suggest an std::set. A set ensures that there are no duplicates (it's like a map, except its elements are the keys), and there's even some weak sorting done. There's no push_back(), but there is still insert(). http://cplusplus.com/reference/stl/set/