1: // Filename: HELLOCLP.CPP 2: // Purpose: Says "Hello" to the person named in the command line parameter. 4: #include <iostream> 5: using namespace std; 7: int main(int argc, char* argv[]) 8: { 9: if (argc != 2) 10: { 11: cout << "\nError: Enter a name, please. But just one!\n\n"; 12: return 1; 13: } 15: cout << "\nHello, " << argv[1] << ".\n"; 17: return 0; 18: }