Associate
- Joined
- 30 Aug 2004
- Posts
- 831
- Location
- Sheffield
hi all,
i'm pretty new to c++, i'm just writing console applications at the minute.
basically my app sets the hours and minutes of a digital clock, however i want the app to ask the following question,
"Enable 24hour mode? [Y/N]"
i want the user to only be able to enter either Y or N? is it possible to check the input (using cin) without the user actually having to press return?
this is for an assignment, so i have to use standard c++, and thus far i haven't found any way to checking it using only standard c++ code
cheers,
munkey
i'm pretty new to c++, i'm just writing console applications at the minute.
basically my app sets the hours and minutes of a digital clock, however i want the app to ask the following question,
"Enable 24hour mode? [Y/N]"
i want the user to only be able to enter either Y or N? is it possible to check the input (using cin) without the user actually having to press return?
this is for an assignment, so i have to use standard c++, and thus far i haven't found any way to checking it using only standard c++ code

cheers,
munkey