Record Detail

Compile Error

/in/ex4.cpp: In member function 'virtual Book bookInventory::viewBook(int) const':
/in/ex4.cpp:43:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (ID < 1 || ID > numBooks) {
                   ~~~^~~~~~~~~~
/in/ex4.cpp: In member function 'virtual void bookInventory::removeBook(int)':
/in/ex4.cpp:50:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (ID < 1 || ID > numBooks) {
                   ~~~^~~~~~~~~~
/in/ex4.cpp: In member function 'void library::borrowBook(int)':
/in/ex4.cpp:77:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (ID < 1 || ID > numBooks) {
                   ~~~^~~~~~~~~~
/in/ex4.cpp: In member function 'void library::returnBook(int)':
/in/ex4.cpp:88:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if (ID < 1 || ID > numBooks) {
                   ~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors
/in/compile/Makefile:26: recipe for target 'ex4.o' failed
make: *** [ex4.o] Error 1

Information

Submit By
Type
Submission
Homework
Exercise 4
Language
C++
Submit At
2024-11-20 00:25:24
Judged At
2024-11-20 00:25:24
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes