Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.