Record Detail

Compile Error

/in/cipher.cpp: In function 'std::__cxx11::string Encryption(std::__cxx11::string, bool)':
/in/cipher.cpp:19:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for(int i=0;i<message.length();i++){
               ~^~~~~~~~~~~~~~~~~
/in/cipher.cpp:38:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if(sparseMode&&i!=message.length()-1){
                    ~^~~~~~~~~~~~~~~~~~~~
/in/cipher.cpp: In function 'std::__cxx11::string Decryption(std::__cxx11::string, bool)':
/in/cipher.cpp:46:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
   for(int i=0;i<message.length();i=i+3){
               ~^~~~~~~~~~~~~~~~~
/in/cipher.cpp:57:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if(sparseMode&&i!=message.length()-3){
                    ~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
/in/compile/Makefile:23: recipe for target 'cipher.o' failed
make: *** [cipher.o] Error 1

Information

Submit By
Type
Submission
Homework
Exercise 3
Language
C++
Submit At
2024-11-03 22:03:13
Judged At
2024-11-03 22:03:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes