//letterwriter.cpp #include //cin, cout, endl using namespace std; #include"letter.h" int main() { Letter word[15]; int i; cout << "Enter 5 symbols." << endl; for (i=0;i<5;i++) cin >> word[i]; //A static member function can be called //without an object Letter::setStyle(Letter::lower); cout << "In lower case: "; for (i=0;i<5;i++) cout << word[i]; //A static member function can be called //by an object word[10].setStyle(Letter::upper); cout << "\nIn upper case: "; for (i=0;i<5;i++) cout << word[i]; word[5].setLetter('g'); word[6].setLetter('G'); cout << "\nAre they the same? " << word[5] << word[6]; if (word[5]==word[6]) cout << " same"; else cout << " different"; // other enums enum {bot, top=9}; int choice; cout << "\nEnter choice: "; cin >> choice; switch (choice) { case bot: cout << "BOTTOM" ; break; case top: cout << "AT THE TOP"; break; default: cout << "somewhere between."; break; } return 1; }