Name
fputwc
Synopsis
Writes a wide character to a file
#include <wchar.h> wint_tfputwc
( wchar_twc
, FILE *fp
);
The fputwc()
function
writes a wide character to the current file position of the
specified FILE
pointer. The
return value is the character written, or WEOF
if an error occurred. Because the
external file associated with a wide-oriented stream is considered
to be a sequence of multibyte characters, fputwc()
implicitly performs a
wide-to-multibyte character conversion. If an encoding error occurs
in the process, fputwc()
sets the
errno
variable to the value of
EILSEQ
(“illegal byte
sequence”).
Example
See the example for fgetwc()
in this
chapter.
See Also
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.