Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

getwc - get wide character from stream

&pagelevel(4)&pagelevel

Syntax

#include <wchar.h>

Optional
#include <stdio.h> (End)

wint_t getwc(FILE *stream);

Description

getwc() is implemented both as a function and as a macro. It is equivalent to fgetwc(),
except that if it is implemented as a macro it may evaluate stream more than once, so the
argument should never be an expression with side effects.

Restriction
This version of the C runtime system only supports 1-byte characters as wide character
codes. They are of type wchar_t (see stddef.h). (End)

Return val.

Errors

Notes

See fgetwc().

See fgetwc().

This interface is provided to support some current implementations and possible future ISO
standards.

When getwc() is implemented as a macro, it may handle a stream argument with side
effects incorrectly. In particular, getwc(*f++) may not work as expected. The use of
fgetwc() is therefore recommended in such situations.

See also

fgetwc(), stdio.h, wchar.h.