dimanche 24 mai 2020

Sorting char pointer using STL sort()

Anyone knows how to sort a char* using std::sort() STL function? In c++

If i use sort like sort(str.begin(),str.end());. An error is coming -'request for member begin and end in str, which is of non-char type 'char*'.

I know how to sort a string using std::sort() in #include<algorithm>

Aucun commentaire:

Enregistrer un commentaire