开发者

C++/STL: XOR of two set

开发者 https://www.devze.com 2023-01-08 07:32 出处:网络
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:

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消