sorting C style strings using sort()

Can give some pointers on how to sort C style strings ( like: char s[10][10])
using generic sort function sort(); present in
please note that I don't wanna use the C++ string class to sort the strings. Is there any way to achieve this ?
"[b]The[blue] GEEK[/blue] Shall Inherit The Earth" ;-) [/b]


  • sort() in is part of the C++ STL, meaning you have to stuff the strings into some sort of container, like "vector". You will also likely need to overload the < operator. If you don't know STL, I suggest either using C++ strings or write your own sorting algorithm for C strings.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion