1 2 3 4 5
|
int a[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; //assume this array of int is from text1
int b[3] = {2, 4, 6}; //assume this array of int is from text2
vector<int> vecRes;
set_difference(a,a+9,b,b+3,back_inserter(vecRes));
copy(vecRes.begin(),vecRes.end(),ostream_iterator<int>(cout,"\n"));
|