Jump to content
  • Advertisement
Sign in to follow this  
GBGames

C++: STL container of unique elements?

This topic is 4967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a project that says I need to use an array to hold the values of some strings. I can manually check to see if a vector has a value before inserting it, and this is trivial enough to implement, but I thought that maybe there was a container I haven't used before. I am still getting familiar with the language and the STL. I Googled and found a Unique Associative Container, but I don't need to be able to associate keys with something. Is there a container that would only accept new values if the value doesn't exist, or is this something that programmers are expected to handle on their own?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!