{{keywords>wiki library source code example reference}}
===== fputws =====
#include
int fputws(const wchar_t *string, FILE *stream);
=== Description ===
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.\\
===== fputws C Sourcecode Example =====
/*
* clearerr example code
* http://code-reference.com/c/wchar.h/fputws
*/
#include /* including standard library */
//#include /* uncomment this for Windows */
#include
#include /* 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;
}
==== output - fputws example code ====
./fputws
fputws example for code-reference.com ÖÄÜ