Boost logo

Boost :

From: Eyal Farago (eyal.farago_at_[hidden])
Date: 2005-04-18 03:25:08

if you want to use the std::merge algorithm:
set<int> c;
std::merge(a.begin(), a.end(), b.begin(),b.end(),std::inserter(c, c.end());

but there is a simpler way to do it:
set<int> c(a); //copy c'tor


-----Original Message-----
From: zlf [mailto:zlfcn_at_[hidden]]
Sent: Monday, April 18, 2005 6:52 AM
To: boost_at_[hidden]
Subject: [boost] How to merge set<int>

    I have to sets(set<int> a,b). How to use function [merge] to merge the
two sets to another one(set<int> c)?

Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at