Given two STL sets, I want to find out the XOR of them. Is there an easy, pre开发者_如何学编程-existing way to do that?
You can use std::set_symmetric_difference
from the C++ standard library.
Yes: std::set_symmetric_difference
Try std::set_symmetric_difference:
http://www.cplusplus.com/reference/algorithm/set_symmetric_difference/
精彩评论