Name

fgetws function — Reads a wide string

Synopsis

wchar_t* fgetwc(wchar_t* str, int n, FILE* stream)

The fgetws function reads a line of wide characters from stream and stores them in str. The newline character is also stored. At most, n wide characters are stored in str, including a terminating null wide character.

The return value is str for success or a null pointer for end-of-file or an error.

Get C++ In a Nutshell 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.