| I/O manipulators | ||||
| Print functions(C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++20) | ||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
(C++98/26*) | ||||
| Synchronized Output | ||||
(C++20) | ||||
| Types | ||||
| Error category interface | ||||
(C++11) | ||||
(C++11) |
| Types and objects | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <cwchar> | ||
std::wint_t putwchar(wchar_t ch); | ||
Writes a wide characterch tostdout.
Contents |
| ch | - | wide character to be written |
ch on success,WEOF on failure.
#include <clocale>#include <cstdio>#include <cstdlib>#include <cwchar>#include <initializer_list> int main(){std::setlocale(LC_ALL,"en_US.utf8"); for(constwchar_t ch:{ L'\u2200',// Unicode name: "FOR ALL" L'∀', L'\n'})if(std::putwchar(ch)== WEOF){std::puts("I/O error in std::putwchar");returnEXIT_FAILURE;} returnEXIT_SUCCESS;}
Possible output:
∀∀
| writes a character tostdout (function)[edit] | |
| writes a wide character to a file stream (function)[edit] | |
C documentation forputwchar | |