Answers for "c++ how to check if set contains string"

C++
1

check if set contains element c++

set<T>::iterator it = theSet.find(element);
if (it != theSet.end())
{
  // The element was found
}
else
{
  // The element was not found
}
Posted by: Guest on May-21-2021

Code answers related to "c++ how to check if set contains string"

Browse Popular Code Answers by Language