User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







c:wchar.h:fputwc

fputwc

   #include <wchar.h>
   wint_t fputwc(wchar_t, FILE *);

Description

fputwc writes a single wide-character to the stream at the position of the file pointer and advances the pointer.
If the write was successful, the character that was written is returned. Otherwise, the function returns WEOF.

fputwc C Sourcecode Example

/* 
 * fputwc example code
 * http://code-reference.com/c/wchar.h/fputwc 
 */
#include <stdio.h> /* including standard library */
//#include <windows.h> /* uncomment this for Windows */
#include <wchar.h>
#include <locale.h>
 
int main( void )
{
    setlocale(LC_ALL,"");
    wchar_t string[] = L"fputwc example for code-reference.com ÖÄÜß\n";
 
    int i = 0;
    while (string[i] != 0) {
        if (fputwc(string[i], stdout) == WEOF) {
            return 1;
        }
        ++i;
    }
    return 0;
}

output - fgetws example code

  
  ./fputwc
  fputwc example for code-reference.com ÖÄÜß
advertising
c/wchar.h/fputwc.txt · Last modified: 2013/01/22 22:02 (external edit)

Impressum Datenschutz

Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/misc_data.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ip.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/pages.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/ua.ser failed
Creating directory /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021 failed
Writing /kunden/homepages/20/d423760527/htdocs/cpp/data/meta/quickstats/10_2021/page_users.ser failed