Home

On Sep 4, 9:28 am, Barry <dh...@126.com> wrote:
> Lambda wrote:
> > I'm looking for a STL function to sort characters inside a string,
> > like:
>
> > string_sort("disprove") => "deioprsv".
>
> #include <iostream>
> #include <string>
> #include <algorithm>
>
> int main()
> {
> std::string str("disprove");
> std::sort(str.begin(), str.end());
> std::cout << str << std::endl;
>
> }

Thanks. It's so easy, I just find out :)

previous
next

Re: can Python be useful as functional?
Re: Latest models of Gibson guitars
Re: Any recommendation about open source project on Natural LanguageProcessing or Information Extrac
Re: sum of two integers
Re: problems using pythom tempfile module
Rodzic Po Ludzku
Podaruj Zycie
Mam Marzenie
Fundacja Hobbit
Fundacja Avalon