A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../../cpp/../cpp/../cpp/../cpp/../c/io/putwchar.html below:

putwchar - cppreference.com

wint_t putwchar( wchar_t ch );

(since C95)

Writes a wide character ch to stdout.

[edit] Parameters ch - wide character to be written [edit] Return value

ch on success, WEOF on failure.

[edit] Example
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <wchar.h>
 
int main()
{
    setlocale(LC_ALL, "en_US.utf8");
 
    const wchar_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");
            return EXIT_FAILURE;
        }
    }
 
    return EXIT_SUCCESS;
}

Possible output:

[edit] References
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4