How do I go about reading in a character value without the user having to press enter?
Thank you for your help,
Daniel
How do I go about reading in a character value without the user having to press enter?
Thank you for your help,
Daniel
Code:#include <iostream.h> int main(void) { char C; cout << "Please enter char: "; cin >> C; cout << "\n" << C; cin.get() //hold screen return 0; }
Be a leader and not a follower.
Using standard functions, you cannot.Originally posted by Daniel
How do I go about reading in a character value without the user having to press enter?
Thank you for your help,
Daniel
Read: http://www.parashift.com/c++-faq-lit...html#faq-15.17
However, if your compiler has conio.h you could use getch() or one of its equivalents.
ooops missed that bitsorryhaving to press enter
Be a leader and not a follower.