fork download
  1. #include <iostream>
  2. #include <cctype>
  3.  
  4. int main()
  5. {
  6. double temp = 42 + 3*3.1415925;
  7. std::cout << isdigit(temp); // why is this returning false?
  8.  
  9. // I am trying to detect "non-numeric" input.
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 2680KB
stdin
Standard input is empty
stdout
1