Using get() with no parameters. : cin get « Console « C++






Using get() with no parameters.

  
#include <iostream>
using namespace std;
int main()
{
   char ch;
   while ( (ch = cin.get()) != EOF)
   {
      cout << "ch: " << ch << endl;
   }
   cout << "\nDone!\n";
   return 0;
}
  
    
  








Related examples in the same category

1.Concatenate get() with Parameters
2.Using get() with parameters.
3.Using get() with No Parameters to read single char
4.Using get() with Parameters to read single char in
5.Using get() with a Character Array