On Tue, Feb 11, 2003 at 04:42:38PM +0100, Jean-Marc Lasgouttes wrote:
> Andre> This could be solved in twelve lines or so in any language that
> Andre> has "map"
> 
> Which is irrelevant to our problem, probably but...

Why? Can't this be used as instead of the 'sort | uniq' you need?

> Andre> set<string> seen; 
> 
> Does the standard offer guarrantees about the order in which these
> things will be given by the iterator? 

Sorted by  operator<(string,string) unless specified otherwise if I am not
mistaken.

Note that _this_ is irrelevant as it is not used for sorting but just to
determine whether we currently look at a duplicate. If so, it is swallowed,
if not, the current string is echoed to cout.

Andre' 

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to