##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::wscanf, std::fwscanf, std::swscanf

From cppreference.com
< cpp‎ | io‎ | c

Defined in header `<cwchar>` |  |
int wscanf( const wchar_t* format, ... ); | (1) | (since C++11)
int fwscanf( FILE *stream, const wchar_t* format, ... ); | (2) | (since C++11)
int swscanf( const wchar_t* buffer, const wchar_t* format, ... ); | (3) | (since C++11)

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`.

### [edit] 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.
| This section is incomplete
... | - | receiving arguments

### [edit] Return value

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

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

vwscanf vfwscanf vswscanf (C++11)(C++11)(C++11) | reads formatted wide character input from stdin, a file stream or a buffer using variable argument list (function) [edit]
C documentation for wscanf, fwscanf, swscanf

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/io/c/fwscanf&oldid=62744"
Categories:

- Todo without reason
- Todo no example