Namespaces
Variants
Views
Actions

wscanf, fwscanf, swscanf

From cppreference.com
< c‎ | io
Revision as of 22:35, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <wchar.h>
</td>

<td></td> <td></td> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
int wscanf( const wchar_t* format, ... );
</td>

<td > (1) </td> <td > (since C99) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
int fwscanf( FILE *stream, const wchar_t* format, ... );
</td>

<td > (2) </td> <td > (since C99) </td> </tr> <tr class="t-dcl-sep"><td></td><td></td><td></td></tr>

<tr class="t-dcl ">

<td >
int swscanf( const wchar_t* buffer, const wchar_t* format, ... );
</td>

<td > (3) </td> <td > (since C99) </td> </tr> Template:ddcl list end

Reads data from the a variety of sources, interprets it according to format and stores the results into given locations.

1) Reads the data from stdin.
2) Reads the data from file stream stream.
3) Reads the data from null-terminated wide string buffer.

Contents

Parameters

stream - input file stream to read from
buffer - pointer to a null-terminated wide string to read from
format - pointer to a null-terminated wide string specifying how to read the input.


... - receiving arguments

Return value

Number of arguments successfully read, or EOF if failure occurs before the first receiving argument was assigned.

Example

See also

Template:c/io/dcl list vfwscanf
C++ documentation for wscanf, fwscanf, swscanf