{filelink=15255}
#include
using namespace std;
#include
#include
#include
int tab1[] = { 2, 3, 4, 6, 8 };
int tab2[] = { 1, 3, 5 };
int main()
{
set set1(tab1, tab1+5);
set set2(tab2, tab2+3);
ostream_iterator< int > output( cout, " " );
cout<<"Set1: ";
copy( set1.begin(), set1.end(), output );
cout << endl;
cout<<"Set2: ";
copy( set2.begin(), set2.end(), output );
cout << endl;
vector sym_diffre;
set_symmetric_difference(set1.begin(),set1.end(),
set2.begin(), set2.end(),
back_inserter(sym_diffre));
copy(sym_diffre.begin(), sym_diffre.end(), output);
return 0;
}