/* F.T. Liu * Demonstration program for comp 1672 * 1/10/03 * Shows some of the utilities available in the string class */ #include #include using namespace std; int main() { string str1("testfile"), str2(".txt"), str3; string name1("Jane"), name2("Abigail"); // Look, you can actually ADD strings together! str3 = str1+str2; cout << str1 << " + " << str2 << " = " << str3 << endl; // Look, you can COMPARE strings! cout << "Here are the two names in alphabetic order: "; if (name1 < name2) cout << name1 << " " << name2 << endl; else cout << name2 << " " << name1 << endl; // You can find out the length of a string: cout << "The name " <