sorting failed error

bearophile bearophileHUGS at lycos.com
Mon Jul 30 12:17:29 PDT 2012


monarch_dodra:

> struct S
> {
>     int opCmp(S b)
>     {
>       if(v[0] < b.v[0]) return -1;
>       if(v[0] > b.v[0]) return  1;
>       return 0;
>     }
>     int[] v;
> }
> ...
> Or did you mean something else?

I meant without a definend opCmp. So this is not your problem.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list