The vfwscanf() function in C++ is used to read formatted data from wide string into variable argument list. It also reads wide character string from a wide string buffer. This function reads data from ws and stores them according to format into the locations pointed by the elements in the variable argument list identified by arg.
It is defined in
int vswscanf( const wchar_t* ws, const wchar_t* format, va_list arg )
Parameters : The function accepts three mandatory parameters which are described below:
- ws :Pointer to the null terminated wide string to read the data
- format :Pointer to a null-terminated wide character string that specifies how to read the input
- arg : A value identifying a variable arguments list initialized with va_start.
Return value: The function returns two value as below:
- on success, it returns the number of arguments successfully read.
- on failure, EOF is returned
Below programs illustrate the above function:
Program 1 :
Random Symbols are : G F G
Program 2 :
Best: websites Quantity: 100
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Modulus function in C++ STL
- How to return multiple values from a function in C or C++?
- Program to Find the Largest Number using Ternary Operator
- Passing Reference to a Pointer in C++
- How to avoid Structure Padding in C?
- wcrtomb() function in C/C++
- vswprintf() function in C/C++
- wcstoul() function in C/C++
- wmemchr() function in C/C++
- wmemcmp() function in C/C++