Hello...
In strings i learned how to sort about numbers...
the question is, how does one sort letters?

there are some sort in alphabet here in Daniweb
but i cant understand its process

is Letter A > than Z? is the computer using ascii values?
isn't A(65)< Z(90)?

if in strings, if i type

string[2]={"Scott","Andrew"};
if(name[0]>name[1]) //results to Andrew then Scott?
//fake code

would it arrange itself in alphabetical order?

help...:|

From www.cplusplus.com about the operators < > <= >= etc:
http://www.cplusplus.com/reference/string/operators/
"These function [sic] depend on the value returned by string member compare."

Regarding compare:
http://www.cplusplus.com/reference/string/string/compare/

"The member function returns 0 if all the characters in the compared contents compare equal, a negative value if the first character that does not match compares to less in the object than in the comparing string, and a positive value in the opposite case."

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.