Record Detail

Compile Error

In file included from /in/ex3.cpp:3:0:
/in/cipher.h:22:1: error: 'string' does not name a type; did you mean 'stdin'?
 string removeSpaces(std::string message);
 ^~~~~~
 stdin
/in/ex3.cpp: In function 'int main(int, char**)':
/in/ex3.cpp:10:9: error: 'cout' was not declared in this scope
         cout << "No option!" << endl;
         ^~~~
/in/ex3.cpp:10:33: error: 'endl' was not declared in this scope
         cout << "No option!" << endl;
                                 ^~~~
/in/ex3.cpp:10:33: note: suggested alternative: 'enum'
         cout << "No option!" << endl;
                                 ^~~~
                                 enum
/in/ex3.cpp:15:9: error: 'cout' was not declared in this scope
         cout << "Too many options!" << endl;
         ^~~~
/in/ex3.cpp:15:40: error: 'endl' was not declared in this scope
         cout << "Too many options!" << endl;
                                        ^~~~
/in/ex3.cpp:15:40: note: suggested alternative: 'enum'
         cout << "Too many options!" << endl;
                                        ^~~~
                                        enum
/in/ex3.cpp:37:9: error: 'cout' was not declared in this scope
         cout << "Invalid option!" << endl;
         ^~~~
/in/ex3.cpp:37:38: error: 'endl' was not declared in this scope
         cout << "Invalid option!" << endl;
                                      ^~~~
/in/ex3.cpp:37:38: note: suggested alternative: 'enum'
         cout << "Invalid option!" << endl;
                                      ^~~~
                                      enum
/in/ex3.cpp:56:17: error: 'cin' was not declared in this scope
         getline(cin, message);
                 ^~~
/in/ex3.cpp:56:17: note: suggested alternative: 'main'
         getline(cin, message);
                 ^~~
                 main
/in/ex3.cpp:58:13: error: 'cout' was not declared in this scope
             cout << endl; 
             ^~~~
/in/ex3.cpp:58:13: note: suggested alternative: 'code'
             cout << endl; 
             ^~~~
             code
/in/ex3.cpp:58:21: error: 'endl' was not declared in this scope
             cout << endl; 
                     ^~~~
/in/ex3.cpp:58:21: note: suggested alternative: 'enum'
             cout << endl; 
                     ^~~~
                     enum
/in/ex3.cpp:62:38: error: 'removeSpaces' was not declared in this scope
             string trimmed_message = removeSpaces(message);
                                      ^~~~~~~~~~~~
/in/ex3.cpp:62:38: note: suggested alternative: 'remove'
             string trimmed_message = removeSpaces(message);
                                      ^~~~~~~~~~~~
                                      remove
/in/ex3.cpp:67:17: error: 'cin' was not declared in this scope
         getline(cin, code);
                 ^~~
/in/ex3.cpp:67:17: note: suggested alternative: 'main'
         getline(cin, code);
                 ^~~
                 main
/in/ex3.cpp:69:13: error: 'cout' was not declared in this scope
             cout << endl;
             ^~~~
/in/ex3.cpp:69:13: note: suggested alternative: 'code'
             cout << endl;
             ^~~~
             code
/in/ex3.cpp:69:21: error: 'endl' was not declared in this scope
             cout << endl;
                     ^~~~
/in/ex3.cpp:69:21: note: suggested alternative: 'enum'
             cout << endl;
                     ^~~~
                     enum
/in/ex3.cpp:73:35: error: 'removeSpaces' was not declared in this scope
             string trimmed_code = removeSpaces(code);
                                   ^~~~~~~~~~~~
/in/ex3.cpp:73:35: note: suggested alternative: 'remove'
             string trimmed_code = removeSpaces(code);
                                   ^~~~~~~~~~~~
                                   remove
/in/compile/Makefile:20: recipe for target 'ex3.o' failed
make: *** [ex3.o] Error 1

Information

Submit By
Type
Submission
Homework
Exercise 3
Language
C++
Submit At
2024-11-01 23:15:44
Judged At
2024-11-01 23:15:44
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes