GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::ungetwc(3) C++ Standard Libary std::ungetwc(3)

std::ungetwc - std::ungetwc


Defined in header <cwchar>
wint_t ungetwc( wint_t ch, std::FILE* stream );


If ch does not equal WEOF, pushes the wide character ch into the input buffer
associated with the stream stream in such a manner than subsequent read operation
from stream will retrieve that wide character. The external device associated with
the stream is not modified.


Stream repositioning operations std::fseek, std::fsetpos, and std::rewind discard
the effects of ungetwc.


If ungetwc is called more than once without an intervening read or repositioning, it
may fail (in other words, a pushback buffer of size 1 is guaranteed, but any larger
buffer is implementation-defined). If multiple successful ungetwc were performed,
read operations retrieve the pushed-back wide characters in reverse order of ungetwc


If ch equals WEOF, the operation fails and the stream is not affected.


A successful call to ungetwc clears the end of file status flag feof.


A successful call to ungetwc on a stream (whether text or binary) modifies the
stream position indicator in unspecified manner but guarantees that after all
pushed-back wide characters are retrieved with a read operation, the stream position
indicator is equal to its value before ungetwc.


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


On success ch is returned.


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


ungetc puts a character back into a file stream
(function)
fgetwc gets a wide character from a file stream
getwc (function)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.