Re: PLEASE - odd string sorting related problem
On Oct 19, 11:57 pm, "cpptutor2...@yahoo.com" <cpptutor2...@yahoo.com>
wrote:
> Could some C guru provide some hints on my problem? I am trying to
> sort an array of character strings, where each string contains
> lowercase, uppercase, digits as well as non-alphanumeric characters as
> '-', '(' or '/'. Obviously, standard C functions as 'strcmp' would
> fail in these cases.
What do you mean by "fail"? strcmp() will work perfectly well in these
cases.
> I can convert all the non-digit characters to
> lowercase, but how do I deal with the non-alphanumeric characters?
I've no idea - it depends how you want to deal with them. Why do you
want to do anything other than use their normal values?
> Any hints or suggestions would be greatly ful.
You need to define exactly what you want to do, then write code to do
it.
|