In the C++ textbook I'm reading (Programming, Principles and Practice using C++ by Bjarne Stroustrup), there are numerous instances of code snippets in which strings are compared as follows:
if (str1 > str2) and then some code.
Could someone please explain to me how "bigger than" and "less than" operators work in conjunction with strings declared as follows:
#include <string>
.
.
.
string str1 = "foo";
string str2 = "bar";
I've tried searching on Stack Overflow and on others for this answer, but to no avail.