Boost logo

Boost :

From: zlf (zlfcn_at_[hidden])
Date: 2005-04-18 06:52:23


Hi Eyal Farago,
    I got it. And thank you for your help :P

zlf

"Eyal Farago" <eyal.farago_at_[hidden]> ????
news:BC29F2A417B44F44BD3AA1AD9868CEDC034282_at_ilexchange.adrembi.com...
> 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
> c.insert(b.begin(),b.end());
>
> eyal.
>
> -----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>
>
>
> Hi,
> I have to sets(set<int> a,b). How to use function [merge] to merge the
> two sets to another one(set<int> c)?
> thx
> zlf
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>
> _______________________________________________
> Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk