书中页数:P78
代码名称:strcompare.cc
#include <string>
using std::string;
#include <iostream>
using std::cout; using std::endl;
int main()
{
string str = "Hello";
string phrase = "Hello World";
string slang = "Hiya";
if (str < phrase) cout << "str is smaller" << endl;
if (slang > str) cout << "slang is greater" << endl;
if (slang > phrase) cout << "slang is greater" << endl;
return 0;
}