14.2. Raw versus Cooked Input

UNIX systems have long used the words Red raw and cooked to define the two different modes of character input. The same terminology applies to console input in the 32-bit API.

Cooked input is the normal input mode for console windows. It is what you get when you use cout and cin, or printf and gets, in a normal MS-DOS window. Cooked input is line-at-a-time input. The user types characters, but you do not receive any of the input until the user presses the Enter key. At that point, the entire line of characters gets placed into the input buffer, and you can access characters one at a time with getc or a line at a time with gets. The getc function, however, will not return anything until the user presses the return ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.