Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

getwchar - Read a wide character from standard input

&pagelevel(4)&pagelevel

Definition

#include <wchar.h>

wint_t getwchar(void);

The function call getwchar(void) is equivalent to getwc(stdin), i.e. reads a wide
character from standard input.

You can satisfy the WEOF condition when reading from the terminal (stdin) by means of
the following actions: pressing the K2 key and entering the system commands EOF and
RESUME-PROGRAM.

Return val.

Wide character code of type wint_t

if successful.

WEOF

if the end-of-file is reached. The end-of-file indicator for the file is set;
or
if a read error occurs. The error indicator for the file is set, and errno is set
to EBADF if fp is an invalid file pointer.

Note

This version of the C runtime system only supports one-byte characters as wide character
codes.

See also

fgetwc, getwc