C Standard Libraries C++

fputws()

Declaration

int fputws(const wchar_t* kwpString, FILE* qpStream);

Description

This function writes the wide-character string, "kwpString," to the stream, "qpStream," at the position of the file pointer and advances the pointer. If the write was successful, a nonnegative integer value is returned. Otherwise, the function returns WEOF.

Example

#include <cwchar>

int main()
{
    wchar_t waName[] = L"XoaX.net\n";
    // Put a string into stdout and check for an error.
    if (fputws(waName, stdout) == WEOF) {
        return 1;
    }
    return 0;
}

Output

fputws() Output
 

© 2007–2024 XoaX.net LLC. All rights reserved.