Frequently the success of the answer depends on the success of the question.
a) Are you using a GUI like Windows or Mac or something else or are you just trying to get the ASCII value of the enter key or are you just trying to get the value of a given char, etc.? In console programming you can get the ASCII value of any char value by casting the char to an int. If you want to close a window to continue the program but only do so if the user pushes the enter key, then that will be OS dependent.
b) What do you mean by remaining time? The remainder of 60 seconds minus how many seconds the window has been open ? The days, hours and minutes until Xmas?
Or do you mean how to position the cursor in a console program so you can locate it in the lower right hand corner of the screen? The tab, newline things is okay for that. Otherwise you could use Console methods for the Windows class if you are using a Windows OS. Other OS should have some method as well.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Offline 2,253 posts
since Jul 2005