I'm rather new at C/C++ and I'm having trouble understanding how these things work. I'm reading a tutorial on them but I don't understand the return values that I'm getting. Let's use the isdigit() function as an example, the tutorial says:
Now suppose that I use the following code:The isdigit() function returns non-zero for true and zero for false. If the parameter is not in the domain of the function, the return result is undefined.
The program will output a 0 for false, but var_one is a digit. What am I missing here?Code:int var_one = 1; bool var_two = isdigit(var_one); cout << var_two << endl;