set<u_int32_t> sResult;

sResult.insert(1); sResult.insert(2); sResult.insert(3);

set<u_int32_t> sAnswer;

sAnswer.insert(2); sAnswer.insert(3); sAnswer.insert(4);

set<u_int32_t> sCommon;

set_intersection(sResult.begin(), sResult.end(), sAnswer.begin(), sAnswer.end(), inserter(sCommon, sCommon.end()));

'Programming Language' 카테고리의 다른 글

STL set set_intersection example  (0) 2015.12.03
freopen example  (0) 2015.11.30
print start recursive c example  (0) 2015.06.19
zigzag c exmaple  (0) 2015.06.19
fraction sort c example  (0) 2015.06.19
shortest path c example  (0) 2015.06.19
by TrafficYoon 2015.12.03 11:04
| 1 2 3 4 5 ··· 67 |