Record Detail

Compile Error

In file included from /in/ex3.cpp:1:0:
/in/cipher.h:21:1: error: 'string' does not name a type; did you mean 'stdin'?
 string inputPreprocessing();
 ^~~~~~
 stdin
/in/cipher.h:23:1: error: 'string' does not name a type; did you mean 'stdin'?
 string compactEncryption(string input);
 ^~~~~~
 stdin
/in/cipher.h:25:1: error: 'string' does not name a type; did you mean 'stdin'?
 string sparseEncryption(string input);
 ^~~~~~
 stdin
/in/cipher.h:27:1: error: 'string' does not name a type; did you mean 'stdin'?
 string compactDecryption(string input);
 ^~~~~~
 stdin
/in/cipher.h:29:1: error: 'string' does not name a type; did you mean 'stdin'?
 string sparseDecryption(string input);
 ^~~~~~
 stdin
/in/ex3.cpp: In function 'int main(int, char**)':
/in/ex3.cpp:40:27: error: 'inputPreprocessing' was not declared in this scope
     string inputMessage = inputPreprocessing();
                           ^~~~~~~~~~~~~~~~~~
/in/ex3.cpp:46:37: error: 'compactEncryption' was not declared in this scope
         string result = isCompact ? compactEncryption(inputMessage) : sparseEncryption(inputMessage);
                                     ^~~~~~~~~~~~~~~~~
/in/ex3.cpp:46:71: error: 'sparseEncryption' was not declared in this scope
         string result = isCompact ? compactEncryption(inputMessage) : sparseEncryption(inputMessage);
                                                                       ^~~~~~~~~~~~~~~~
/in/ex3.cpp:46:71: note: suggested alternative: 'isEncrypt'
         string result = isCompact ? compactEncryption(inputMessage) : sparseEncryption(inputMessage);
                                                                       ^~~~~~~~~~~~~~~~
                                                                       isEncrypt
/in/ex3.cpp:49:37: error: 'compactDecryption' was not declared in this scope
         string result = isCompact ? compactDecryption(inputMessage) : sparseDecryption(inputMessage);
                                     ^~~~~~~~~~~~~~~~~
/in/ex3.cpp:49:71: error: 'sparseDecryption' was not declared in this scope
         string result = isCompact ? compactDecryption(inputMessage) : sparseDecryption(inputMessage);
                                                                       ^~~~~~~~~~~~~~~~
/in/ex3.cpp:49:71: note: suggested alternative: 'isDecrypt'
         string result = isCompact ? compactDecryption(inputMessage) : sparseDecryption(inputMessage);
                                                                       ^~~~~~~~~~~~~~~~
                                                                       isDecrypt
/in/ex3.cpp:33:10: error: unused variable 'isSparse' [-Werror=unused-variable]
     bool isSparse = (outputMode == "-s" || outputMode == "--sparse");
          ^~~~~~~~
cc1plus: all warnings being treated as errors
/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-03 02:44:40
Judged At
2024-11-03 02:44:40
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes