Ok. I got your point.
Will this work fine?
I assume finalList will contain the unique report rows from objectList1. Another person will write a function and will pass me the 2 lists so I cant test with actual data now.Code:list < report_row > ::iterator listIterEnd, listIter; list<report_row> finalList; finalList.clear(); objectList1.sort(); objectList2.sort(); listIterEnd = set_difference(objectList1.begin(), objectList1.end(), objectList2.begin(), objectList2.end(), finalList.begin());