How to compare two strings?

How could I compare two strings alphabetically? I want to be able to give my function two strings, string1 and string 2, and then be able to say something like:
1
2
3
4
if(string1 > string2){

//do something if string1 comes before string 2 in the alphabet
}
If you use std::string, operator < and etc. will work.
If you use char*, see http://cplusplus.com/reference/clibrary/cstring/strcmp/
Topic archived. No new replies allowed.