ungetwc - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# ungetwc

From cppreference.com
< c‎ | io

Defined in header `<wchar.h>` |  |
wint_t ungetwc( wint_t ch, FILE *stream ); |  | (since C95)

Puts the wide character `ch` back to the given file stream. Only one wide character pushback is guaranteed.

### [edit] Parameters

ch | - | wide character to be put back
stream | - | file stream to put the wide character back to

### [edit] Return value

On success `ch` is returned.

On failure WEOF is returned and the given stream remains unchanged.

### [edit] References

- C11 standard (ISO/IEC 9899:2011):

  - 7.29.3.10 The ungetwc function (p: 425-426)

- C99 standard (ISO/IEC 9899:1999):

  - 7.24.3.10 The ungetwc function (p: 370-371)

### [edit] See also

ungetc | puts a character back into a file stream (function) [edit]
fgetwcgetwc (C95) | gets a wide character from a file stream (function) [edit]
C++ documentation for ungetwc

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