Record Detail

Compile Error

/in/calc.cpp:131:28: error: no matching function for call to 'isdigit'
                } else if (isdigit(token)) {
                           ^~~~~~~
/usr/include/ctype.h:111:12: note: candidate function not viable: no known conversion from 'std::__cxx11::string' (aka 'basic_string<char>') to 'int' for 1st argument
__exctype (isdigit);
           ^
/usr/include/ctype.h:102:36: note: expanded from macro '__exctype'
#define __exctype(name) extern int name (int) __THROW
                                   ^
/in/calc.cpp:9:6: note: candidate function not viable: no known conversion from 'std::__cxx11::string' (aka 'basic_string<char>') to 'char' for 1st argument
bool isdigit(char c){
     ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/locale_facets.h:2601:5: note: candidate function template not viable: requires 2 arguments, but 1 was provided
    isdigit(_CharT __c, const locale& __loc)
    ^
1 error generated.
/in/Compile/Makefile:44: recipe for target 'buildCalc' failed
make: *** [buildCalc] Error 1

Information

Submit By
Type
Submission
Homework
Project 5
Language
C++
Submit At
2024-12-10 22:31:09
Judged At
2024-12-10 22:31:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes