I'm testing three different methods for sorting strings. Unfortunately, the MSVC compiler is having trouble compiling a direct string comparison using the overloaded relational operators < and >. I get the following compiler error: 'bool std::operator >(const std::move_iterator<_RanIt> &,const std::move_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::move_iterator<_RanIt> &' from 'std::string'.
Should I just do a char-by-char comparison or is there an alternative?
Not sure I understand the error message, but it looks like you might be trying to compare a string with an iterator or something like that. Make sure operands are actually std::string.
I had included <string.h>. I changed it to <string> and it compiled just fine. Maybe the compiler translated <string.h> as <cstring>. Yet more craziness with the Not-so-standard libraries. As for the output, that's something else entirely.
<string.h> is the header for the standard C (not C++) string functions, like strcpy, strcat, strlen. And <cstring> the wrapper header that puts the C functions into the std namespace. http://www.cplusplus.com/reference/cstring/
Nothing crazy about it -- it's perfectly standard!