Record Detail

Compile Error

/in/HW6.cpp: In member function 'std::__cxx11::string Book::print_res()':
/in/HW6.cpp:42:17: error: 'strcpy' was not declared in this scope
                 strcpy(hz,os);
                 ^~~~~~
/in/HW6.cpp:42:17: note: suggested alternative: 'strtoq'
                 strcpy(hz,os);
                 ^~~~~~
                 strtoq
/in/HW6.cpp:45:17: error: 'strcpy' was not declared in this scope
                 strcpy(hz,bor);
                 ^~~~~~
/in/HW6.cpp:45:17: note: suggested alternative: 'strtoq'
                 strcpy(hz,bor);
                 ^~~~~~
                 strtoq
/in/HW6.cpp: In member function 'std::__cxx11::string Customer::print_res()':
/in/HW6.cpp:123:13: error: 'strcpy' was not declared in this scope
             strcpy(hz,os);
             ^~~~~~
/in/HW6.cpp:123:13: note: suggested alternative: 'strtoq'
             strcpy(hz,os);
             ^~~~~~
             strtoq
/in/HW6.cpp:126:13: error: 'strcpy' was not declared in this scope
             strcpy(hz,bor);
             ^~~~~~
/in/HW6.cpp:126:13: note: suggested alternative: 'strtoq'
             strcpy(hz,bor);
             ^~~~~~
             strtoq
/in/HW6.cpp: In member function 'std::__cxx11::string Library::add_book(int, std::__cxx11::string)':
/in/HW6.cpp:147:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::list_book()':
/in/HW6.cpp:162:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int i = 0; i < books.size(); i++){
                         ~~^~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::check_b1(int)':
/in/HW6.cpp:170:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::check_b2(std::__cxx11::string)':
/in/HW6.cpp:179:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::add_customer(int, std::__cxx11::string)':
/in/HW6.cpp:193:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < customers.size(); i++){
                        ~~^~~~~~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::list_customer()':
/in/HW6.cpp:208:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int i = 0; i < customers.size(); i++){
                         ~~^~~~~~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::check_bc(int)':
/in/HW6.cpp:217:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int j = 0; j < customers.size(); j++){
                        ~~^~~~~~~~~~~~~~~~~~
/in/HW6.cpp:223:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::borrow(int, int)':
/in/HW6.cpp:235:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp:239:38: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
                     for(int j = 0; j < customers.size(); j++){
                                    ~~^~~~~~~~~~~~~~~~~~
/in/HW6.cpp: In member function 'std::__cxx11::string Library::return_book(int)':
/in/HW6.cpp:262:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for(int i = 0; i < books.size(); i++){
                        ~~^~~~~~~~~~~~~~
/in/HW6.cpp:261:14: error: unused variable 'buffer' [-Werror=unused-variable]
         char buffer[100];
              ^~~~~~
/in/HW6.cpp: In function 'int main()':
/in/HW6.cpp:292:17: error: unused variable 'i3' [-Werror=unused-variable]
     int i1, i2, i3, i4;
                 ^~
/in/HW6.cpp:292:21: error: unused variable 'i4' [-Werror=unused-variable]
     int i1, i2, i3, i4;
                     ^~
/in/HW6.cpp:294:10: error: unused variable 'buf' [-Werror=unused-variable]
     char buf[100];
          ^~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
HW #6
Language
C++
Submit At
2020-12-01 19:35:23
Judged At
2020-12-01 19:35:23
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes