P
Phil
Hello,
I'm trying to get the result of a set intersection and I'm sure that I've
made a very basic error.
A Google search has helped but I'm still not quite there. Can someone show
me the error?
set<int> firstSet;
secondSet.insert(1);
secondSet.insert(2);
set<int> secondSet;
secondSet.insert(2);
set<int> resultSet;
resultSet = set_intersection(firstSet.begin(), firstSet.end(),
secondSet.begin(), secondSet.end(), resultSet.begin());
I'm trying to get the result of a set intersection and I'm sure that I've
made a very basic error.
A Google search has helped but I'm still not quite there. Can someone show
me the error?
set<int> firstSet;
secondSet.insert(1);
secondSet.insert(2);
set<int> secondSet;
secondSet.insert(2);
set<int> resultSet;
resultSet = set_intersection(firstSet.begin(), firstSet.end(),
secondSet.begin(), secondSet.end(), resultSet.begin());