vwprintf - C wchar.h

C examples for wchar.h:vwprintf

Type

function

From


<cwchar>
<wchar.h>

Description

Print formatted data from variable argument list to stdout

Prototype

int vwprintf (const wchar_t* format, va_list arg);

Parameters

Parameter Description
format a printf format string
arg a variable arguments

Return Value

On success, the total number of characters written is returned.

On error, the error indicator ferror is set and a negative number is returned.

Demo Code

#include <stdarg.h>
#include <wchar.h>

void WriteWideFormatted ( const wchar_t * format, ... )
{
  va_list args;//from  w  w w .  j av a  2  s.c  om
  va_start (args, format);
  vwprintf (format, args);
  va_end (args);
}

int main ()
{
   WriteWideFormatted (L"Call with %d variable argument.\n",1);
   WriteWideFormatted (L"Call with %d variable %ls.\n",2,L"arguments");

   return 0;
}

Related Tutorials