Types and objects | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Defined in header <wchar.h> | ||
wint_t putwchar(wchar_t ch); | (since C95) | |
Writes a wide characterch tostdout
.
Contents |
ch | - | wide character to be written |
ch on success,WEOF on failure.
#include <locale.h>#include <stdio.h>#include <stdlib.h>#include <wchar.h> int main(){setlocale(LC_ALL,"en_US.utf8"); constwchar_t data[]={ L'\u2200',// Unicode name: "FOR ALL" L'∀', L'\n',}; for(size_t t=0; t!=(sizeof data/sizeof(wchar_t));++t){if(putwchar(data[t])== WEOF){puts("I/O error in putwchar");returnEXIT_FAILURE;}} returnEXIT_SUCCESS;}
Possible output:
∀∀
writes a character tostdout (function)[edit] | |
(C95) | writes a wide character to a file stream (function)[edit] |
C++ documentation forputwchar |