sorting C style strings using sort() - Programmers Heaven

Howdy, Stranger!

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

Categories

sorting C style strings using sort()

da_comp_guyda_comp_guy Posts: 37Member
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]

Comments

  • LundinLundin Posts: 3,711Member
    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.