Record Detail

Compile Error

/in/calc.cpp:13:9: error: use of undeclared identifier 'cout'; did you mean 'std::cout'?
        cout << "Not enough operands\n";
        ^~~~
        std::cout
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/iostream:61:18: note: 'std::cout' declared here
  extern ostream cout;          /// Linked to standard output
                 ^
/in/calc.cpp:65:17: error: use of undeclared identifier 'cout'; did you mean 'std::cout'?
                cout << "Divide by zero\n";
                ^~~~
                std::cout
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/iostream:61:18: note: 'std::cout' declared here
  extern ostream cout;          /// Linked to standard output
                 ^
/in/calc.cpp:111:13: error: cannot jump from switch statement to this case label
            default:
            ^
/in/calc.cpp:102:22: note: jump bypasses variable initialization
                int *num2= new int(*num);
                     ^
/in/calc.cpp:107:13: error: cannot jump from switch statement to this case label
            case 'p':
            ^
/in/calc.cpp:102:22: note: jump bypasses variable initialization
                int *num2= new int(*num);
                     ^
/in/calc.cpp:134:13: error: unknown type name 'string'; did you mean 'std::string'?
void insert(string input, Dlist<int> *stack){
            ^~~~~~
            std::string
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
  typedef basic_string<char>    string;   
                                ^
/in/calc.cpp:153:15: error: unknown type name 'string'; did you mean 'std::string'?
bool validNum(string snum){
              ^~~~~~
              std::string
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
  typedef basic_string<char>    string;   
                                ^
/in/calc.cpp:154:22: error: use of undeclared identifier 'input'
    int length = int(input.length())
                     ^
/in/calc.cpp:168:15: error: unknown type name 'string'; did you mean 'std::string'?
bool badInput(string input){ //neither a valid integer nor one of the commands above
              ^~~~~~
              std::string
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
  typedef basic_string<char>    string;   
                                ^
/in/calc.cpp:178:17: error: unknown type name 'string'; did you mean 'std::string'?
bool validInput(string input, Dlist<int> *stack){
                ^~~~~~
                std::string
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
  typedef basic_string<char>    string;   
                                ^
/in/calc.cpp:211:5: error: unknown type name 'string'; did you mean 'std::string'?
    string sinput;
    ^~~~~~
    std::string
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/stringfwd.h:74:33: note: 'std::string' declared here
  typedef basic_string<char>    string;   
                                ^
/in/calc.cpp:214:22: error: use of undeclared identifier 'input'; did you mean 'sinput'?
    while(validInput(input,stack)){
                     ^~~~~
                     sinput
/in/calc.cpp:211:12: note: 'sinput' declared here
    string sinput;
           ^
11 errors 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
2022-12-17 22:23:15
Judged At
2022-12-17 22:23:15
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes