Concatenate get() with Parameters : cin get « Console « C++






Concatenate get() with Parameters

  
#include <iostream>

int main()
{
   char a, b, c;

   std::cout << "Enter three letters: ";

   std::cin.get(a).get(b).get(c);

   std::cout << "a: " << a << "\nb: ";
   std::cout << b << "\nc: " << c << std::endl;
   return 0;
}
  
    
  








Related examples in the same category

1.Using get() with no 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