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());
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
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"