The iswdigit() is a built-in function in C++ STL which checks if the given wide character is an decimal digit character or not. It is defined within the cwctype header file of C++. The characters from 0 to 9 i.e.0, 1, 2, 3, 4, 5, 6, 7, 8, 9 are classified as decimal digits.
Parameter: The function accepts a single mandatory parameter ch which specifies the wide character which we have to check that if it is a digit or not.
Return Value: The function returns two values as shown below.
- If the ch is a digit, then a non-zero value is returned.
- If it is not then 0 is returned.
Below programs illustrates the above function.
? is not a digit 3 is a digit
1 is a digit q is not a digit
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- log() function in C++
- exp() function C++
- div() function in C++
- arc function in C
- fma() function in C++
- strtod() function in C/C++
- unordered_multiset end() function in C++ STL
- array get() function in C++ STL
- array at() function in C++ STL
- strcspn() function in C/C++
- atexit() function in C/C++
- unordered_map end( ) function in C++ STL
- strrchr() function in C/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 email@example.com. 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.