Programming Reference/Librarys
Question & Answer
Q&A is closed
fputws writes the wide-character string to the stream, 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.
/* * clearerr example code * http://code-reference.com/c/wchar.h/fputws */ #include <stdio.h> /* including standard library */ //#include <windows.h> /* uncomment this for Windows */ #include <wchar.h> #include <locale.h> /* nessesary for this example */ int main ( void ) { setlocale(LC_ALL,""); wchar_t string[] = L"fputws example for code-reference.com ÖÄÜ\n"; if (fputws(string, stdout) == WEOF) { return 1; } return 0; }
./fputws fputws example for code-reference.com ÖÄÜ