C++ examples for File Stream:cin
Read a character using cin
#include <iostream> using namespace std; int main()// w ww. ja va 2s . c o m { char fkey; cout << "Type in a character: "; cin.get(fkey); cout << "The key just accepted is " << int(fkey) << endl; return 0; }