How can I examine that the elements of the set are equal to zero?
It is not working with find()
.
What do I have to use instead find()
?
#include <iostream>
#include <set>
using namespace std;
int main()
{
set<int> numbers;
for(int j = 0; j < 10; j++)
{
if (numbers.find(j) == 0)
{
cout << "Yes.";
}
else
{
cout << "No.";
}
}
return 0;
}