Hello.
There is an easy way to remove duplicate items?
Thank you
Jim.
Remove duplicate items in wxArrayInt
Re: Remove duplicate items in wxArrayInt
If with "easy" you mean a single call that does this for you: No.
Are you forced to use wxArrayInt because it's used by a wxWidgets method? Or could you use another container?
Use the source, Luke!
Re: Remove duplicate items in wxArrayInt
I am looking for an easy way with wxWidgets framework.
I is pretty for that great framework not have something.
Thank you.
Jim
I is pretty for that great framework not have something.
Thank you.
Jim
Re: Remove duplicate items in wxArrayInt
Hi,
Why not use std::vector<> instead?
All those wx-related container are done because there was no STL when the library was created (in 1980th).
STL will mark all of them obsolete.
Unless you absolutely have to use them (for compatibility reasons with the 3rd party library).
Thank you.
Why not use std::vector<> instead?
All those wx-related container are done because there was no STL when the library was created (in 1980th).
STL will mark all of them obsolete.
Unless you absolutely have to use them (for compatibility reasons with the 3rd party library).
Thank you.
Re: Remove duplicate items in wxArrayInt
So i must use vector container.
Thank you
Jim.
Thank you
Jim.
Re: Remove duplicate items in wxArrayInt
std::vector doesn't have a function for that either. The best solution depends on your use case which you still haven't told us.
Look into std::set and std::unordered_set
https://www.programiz.com/cpp-programming/unordered-set
Use the source, Luke!