0

can we do sorting in chars in c++
like
if acdb is input
and abcd as output
any one provide me prog for this ...........
or Sample code:
plz...........

5
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by Freaky_Chris
0

How are the char stored---individual free standing variables, string (C style vs STL string object vs other string object implementation like CString or APSTring), or individual char in an array/list/vector/stack, whatever?

0

can any one provide me a sample code for it ........?????
plz

0

can any one provide me a sample code for it ........?????
plz

Sample code for what? A sorting algorithm? Sorting characters as opposed to integers (as Mosaic mentions, characters are treated as integers, only they don't have as big of a range). Lots of sample code out there. Check the code snippets section, google "C++ bubble sort", stuff like that, but be more specific if you've tried these things and haven't found the results. A bubble sort implementation is pretty short.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.