I try to take the difference of two sets and record the rest into another set...
but it is giving me errors
what should I do?Code:set<int> a,b,c;
c = set_difference(a.begin(),a.end(),b.begin(),b.end(),c.begin());
Printable View
I try to take the difference of two sets and record the rest into another set...
but it is giving me errors
what should I do?Code:set<int> a,b,c;
c = set_difference(a.begin(),a.end(),b.begin(),b.end(),c.begin());
That last parameter needs to be std::inserter(c, c.begin()) not c.begin()
http://www.sgi.com/tech/stl/set.html