Problems with isdigit

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
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".
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?
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!
Topic archived. No new replies allowed.