Record Detail

Compile Error

/in/HW7.cpp: In member function 'void Library::addbook(Book)':
/in/HW7.cpp:30:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (i < vb.size() && book.bookID != vb[i].bookID) ++i;
                ~~^~~~~~~~~~~
/in/HW7.cpp:31:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (i == vb.size()) {vb.push_back(book);cout << book.book_title << " added to the system." << endl;}
             ~~^~~~~~~~~~~~
/in/HW7.cpp: In member function 'void Library::addcustomer(Customer)':
/in/HW7.cpp:37:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         while (i < vc.size() && customer.customerID != vc[i].customerID) ++i;
                ~~^~~~~~~~~~~
/in/HW7.cpp:38:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (i == vc.size()) {vc.push_back(customer);cout << customer.customer_name << " added to the system." << endl;}
             ~~^~~~~~~~~~~~
/in/HW7.cpp: In member function 'void Library::checkc(std::__cxx11::string)':
/in/HW7.cpp:88:26: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int j = 0;j < vc[i].vbbID.size();++j) cout << vc[i].vbbID[j] << " " << vc[i].vbb_t[j] << endl;
                        ~~^~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
HW7
Language
C++
Submit At
2021-11-29 20:10:04
Judged At
2021-11-29 20:10:04
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes