pos::iterator itr,itp;
cout<<" UNION of the two sets"<<endl;
itr=set_union(p.first.begin(),p.first.end(),obj.last.begin(),obj.last.end(),p.result.begin());
//ERROR is in the fifth parameter that i am using i.e. p.result.begin()
/*I am getting errors while doing the union.I think it is becoz of the fifth parameter that i am passing i.e. p.result.begin();what is the error ?? PLEASE HELP. THANK YOU.*/
#include <iterator>
set_union(
p.first.begin(),
p.first.end(),
obj.last.begin(),
obj.last.end(),
inserter(
p.result,
p.result.end() //I'm not sure what should be here
)
);