Record Detail

Compile Error

/in/Rectangle.cpp:8:43: error: extra ';' [-Werror=pedantic]
 bool cmp(int s1, int s2) { return(s1<s2);};
                                           ^
/in/Rectangle.cpp: In member function 'bool Rectangle::isRect()':
/in/Rectangle.cpp:26:13: error: unused variable 'x_cor' [-Werror=unused-variable]
         int x_cor[2]={X[0],X[2]};
             ^~~~~
/in/Rectangle.cpp:27:13: error: unused variable 'y_cor' [-Werror=unused-variable]
         int y_cor[2]={Y[0],Y[2]};
             ^~~~~
cc1plus: all warnings being treated as errors
/in/compile/ex2.cpp: In function 'int main()':
/in/compile/ex2.cpp:12:18: error: no matching function for call to 'Rectangle::Rectangle(<brace-enclosed initializer list>)'
     Rectangle r{m};
                  ^
In file included from /in/compile/ex2.cpp:4:0:
/in/Rectangle.h:12:7: note: candidate: Rectangle::Rectangle()
 class Rectangle{
       ^~~~~~~~~
/in/Rectangle.h:12:7: note:   candidate expects 0 arguments, 1 provided
/in/Rectangle.h:12:7: note: candidate: constexpr Rectangle::Rectangle(const Rectangle&)
/in/Rectangle.h:12:7: note:   no known conversion for argument 1 from 'std::vector<MyPoint>' to 'const Rectangle&'
/in/Rectangle.h:12:7: note: candidate: constexpr Rectangle::Rectangle(Rectangle&&)
/in/Rectangle.h:12:7: note:   no known conversion for argument 1 from 'std::vector<MyPoint>' to 'Rectangle&&'

Information

Submit By
Type
Submission
Homework
Homework 8
Language
C++
Submit At
2022-07-30 16:40:05
Judged At
2022-08-02 15:54:45
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes