Namespaces
Variants

std:: putwchar

From cppreference.net
< cpp ‎ | io ‎ | c
헤더 파일에 정의됨 <cwchar>
std:: wint_t putwchar ( wchar_t ch ) ;

와이드 문자 ch stdout 에 씁니다.

목차

매개변수

ch - 기록할 와이드 문자

반환값

ch 성공 시, WEOF 실패 시.

예제

#include <clocale>
#include <cstdio>
#include <cstdlib>
#include <cwchar>
#include <initializer_list>
int main()
{
    std::setlocale(LC_ALL, "en_US.utf8");
    for (const wchar_t ch : {
        L'\u2200', // Unicode name: "FOR ALL"
        L'∀',
        L'\n'
        })
        if (std::putwchar(ch) == WEOF)
        {
            std::puts("I/O error in std::putwchar");
            return EXIT_FAILURE;
        }
    return EXIT_SUCCESS;
}

가능한 출력:

∀∀

참고 항목

문자를 stdout 에 기록합니다
(함수)
파일 스트림에 와이드 문자를 기록합니다
(함수)
C documentation for putwchar