The vwprintf() function in C++ is used to write a formatted wide string to stdout. It prints formatted data from variable argument list to stdout. Internally, the function retrieves arguments from the list identified by arg as if va_arg was used on it, and thus the state of arg is likely altered by the call. The wide string format may contain format specifiers starting with % which are replaced by the values of variables that are passed as a list vlist.
It is defined in header file <cwchar.h>
int vwprintf( const wchar_t* format, va_list vlist )
Parameter : The function accepts four mandatory parameters which are described below:
- format: specifies a pointer to a null terminated wide string that is written to stdout
- arg: specifies a value identifying a variable arguments list initialized with va_start
Return value : The function returns two value as below:
- On success, the total number of characters written is returned.
- A negative number is returned if some error is occurred.
Below programs illustrate the above function:
Program 1 :
Some English Letters First : A Second : B Third : C Fourth : D Fifth : E
Some Latin Letters First : ! Second : " Third : # Fourth : $ Fifth : %
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- exp() function C++
- log() function in C++
- fma() function in C++
- arc function in C
- div() function in C++
- feupdateenv() function in C++
- iswlower() function in C/C++
- fread() function in C++
- raise() function in C++
- tellg() function in C++ with example
- wcstombs() function in C++ STL
- Address of a function in C or C++
- strol() function in C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.