##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::fputwc

From cppreference.com
< cpp‎ | io‎ | c

Defined in header `<cwchar>` |  |
wint_t fputwc( wchar_t ch, std::FILE* stream ); |  |
wint_t putwc( wchar_t ch, std::FILE* stream ); |  |

Writes a wide character `ch` to the given output stream `stream`. putwc() may be implemented as a macro and may evaluate `stream` more than once.

### [edit] Parameters

ch | - | wide character to be written
stream | - | the output stream

### [edit] Return value

`ch` on success, WEOF on failure. If an encoding error occurs, errno is set to `EILSEQ`.

### [edit] See also

fputc putc | writes a character to a file stream (function) [edit]
fputws | writes a wide string to a file stream (function) [edit]
fgetwc getwc | gets a wide character from a file stream (function) [edit]
C documentation for fputwc

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/io/c/fputwc&oldid=67601"