Dec 7, 2013 at 12:42am UTC
Shouldnt this return either true or false?
1 2 3 4 5 6 7
// FUNCTION: isdigit
// Purpose: If the value of the single argument to the function is a
// digit, the function returns true; otherwise, returns false.
bool isdigit(char ch)
{
return isdigit(ch);
{
Last edited on Dec 7, 2013 at 12:43am UTC
Dec 7, 2013 at 1:02am UTC
Make sure to set your compiler to complain as much as possible and try compiling that to see what it says.
Hint: you have defined a function named "isdigit", and inside that function you call the function named "isdigit".
Dec 7, 2013 at 1:08am UTC
isdigit is a function that will check if its a digit right? how the hell do i use it if my premade lab is calling the function itself isdigit?
Dec 7, 2013 at 4:42am UTC
I think the point is not to use the std::isdigit() function. You need to write the guts of the function yourself.
Try to test ch to see if it is a digit character or not.
Good luck!