
counting unique items in an unsorted array
I think you need to seriously reconsider the container you're storing the
data in. If you need fast lookup, then vector<> is not what you should use.
Without more details on what you're storing, its hard to make more specific
recommendations.
If you never remove items, then you could keep a set<> and insert into the
set at the same time you insert into the vector<>. Then you just use
set<>::size().
HTH
DanL
Quote:
>Does STL provide an algorithm to count the number of unique items in an
>unsorted array? In our application this is required because we have
multiple
>dimensions and time contstraints do not permit resorting the array.
>Thanks, Conan