// CommandLineDemo2.cpp
// Demonstrates command line arguments
// with instructional message.

#include <iostream>
using namespace std;

int main(int argc, char** argv)
{
   if ( argc < 4 )  {
      cout << "To run this program, type:" << endl;
      cout << "   " << argv[0]
                    << " firstname middlename lastname" << endl;
      cout << "using your actual first, middle,"
                    << " and last name" << endl;
      return 0;
   }  // if

   cout << "Hello, " << argv[1] << " "
                     << argv[2] << " "
                     << argv[3] << ".  ";
   cout << "Thank you for using " << argv[0] << "." << endl;
   return 0;
}  // function main