Answers for "check if set contains element c++"

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 "check if set contains element c++"

Browse Popular Code Answers by Language