User Tools

Site Tools


c:wchar.h:fputws

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:wchar.h:fputws [2024/02/16 01:05] (current)
Line 1: Line 1:
 +{{keywords>wiki library source code example reference}}
 +===== fputws =====
 +<code c>
 +   #include <wchar.h>
 +   int fputws(const wchar_t *string, FILE *stream);
 +</code>
  
 +
 +=== 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 =====
 +<code c>
 +/* 
 + * 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;
 +}
 +
 +</code>
 +
 +====  output - fputws example code ====
 +    
 +    ./fputws 
 +    fputws example for code-reference.com ÖÄÜ
 +
 +
 +
 +
 +    

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/wchar.h/fputws.txt · Last modified: 2024/02/16 01:05 (external edit)

Impressum Datenschutz