A summary with code samples of the set operations that come with STL: union, intersection, symmetrical difference and set difference. For consistency, the two sets of integer vectors used in each example are the same and are: [code language="cpp"] vals1 = { 1, 2, 4 } vals2 = { 1, 2, 5, 7 }; [/code] Unions The union of two sets is formed by the elements that are present in either one of the sets, or in both. [code language="cpp"] #include <iostream> #include <algorithm> #include <iterator> #include <string> #include <vector> typedef std::vector<int>::iterator iter; template<typename T, typename InputIterator> void Print(std::ostream& ostr, InputIterator itbegin, InputIterator itend, const std::string& delimiter) { std::copy(itbegin, itend, std::ostream_iterator<T>(ostr, delimiter.c_str())); } int main() {...