vfwscanf, vswscanf, vwscanf


vfwscanf, vswscanf, vwscanf

Reads formatted wide-character input using a variable argument list object

 #include <stdarg.h> #include <wchar.h> int vswscanf ( const wchar_t * restrict s , const wchar_t * restrict format ,               va_list argptr  ); int vwscanf ( const wchar_t * restrict format , va_list argptr  ); #include <stdio.h>   // (in addition to <stdarg.h> and <wchar.h>) int vfwscanf ( FILE * restrict fp , const wchar_t * restrict format ,               va_list argptr  ); 

The functions vfwscanf( ), vswscanf( ), and vwscanf( ) are like fwscanf( ), swscanf( ), and wscanf( ), respectively, except that their final argument, argptr, is a variable-argument list object with type va_list. The program must initialize this object by calling the va_start( ) macro before calling the vfwscanf( ), vswscanf( ), or vwscanf( ) function, and must call the va_end( ) macro after the function returns. Because these functions use the va_arg( ) macro internally to advance the pointer through the argument list, its value is indeterminate after the vfwprintf( ), vswprintf( ), or vwprintf( ) function call has returned.

The vfwscanf( ), vswscanf( ), and vwscanf( ) functions return the number of input items assigned to variables, which may be 0; or EOF if an input failure occurs before any conversion takes place.

Example

See the example for the corresponding byte-character function vfscanf( ) in this chapter.

See Also

va_start( ), va_arg( ), va_copy( ) and va_end( ); fwscanf( ), swscanf( ), and wscanf( ); vfwprintf( ), vswprintf( ), and vwprintf( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net