Listing 4 Identical to program copy1.cpp, but uses the extraction operator to read whitespace

// copy3.cpp: Read whitespace with >>
#include <iostream.h>

main()
{
   char c;

   // Don't skip whitespace
   cin.unsetf(ios::skipws);

   while (cin >> c)
      cout << c;
   return 0;
}

// End of File