Record Detail

Compile Error

/in/Rectangle.cpp: In function 'void getArea(MyPoint&, MyPoint&, MyPoint&, MyPoint&)':
/in/Rectangle.cpp:39:48: error: unused parameter 'p3' [-Werror=unused-parameter]
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4)
                                                ^~
cc1plus: all warnings being treated as errors
In file included from /in/compile/ex2.cpp:4:0:
/in/Rectangle.h:2:14: error: variable or field 'getArea' declared void
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
              ^~~~~~~
/in/Rectangle.h:2:14: error: 'MyPoint' was not declared in this scope
/in/Rectangle.h:2:23: error: 'p1' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                       ^~
/in/Rectangle.h:2:27: error: 'MyPoint' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                           ^~~~~~~
/in/Rectangle.h:2:36: error: 'p2' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                                    ^~
/in/Rectangle.h:2:39: error: 'MyPoint' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                                       ^~~~~~~
/in/Rectangle.h:2:48: error: 'p3' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                                                ^~
/in/Rectangle.h:2:51: error: 'MyPoint' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                                                   ^~~~~~~
/in/Rectangle.h:2:60: error: 'p4' was not declared in this scope
 void getArea(MyPoint &p1, MyPoint &p2,MyPoint &p3,MyPoint &p4);
                                                            ^~
/in/compile/ex2.cpp: In function 'int main()':
/in/compile/ex2.cpp:6:17: error: 'MyPoint' was not declared in this scope
     std::vector<MyPoint> m;
                 ^~~~~~~
/in/compile/ex2.cpp:6:24: error: template argument 1 is invalid
     std::vector<MyPoint> m;
                        ^
/in/compile/ex2.cpp:6:24: error: template argument 2 is invalid
/in/compile/ex2.cpp:10:11: error: request for member 'emplace_back' in 'm', which is of non-class type 'int'
         m.emplace_back(tempx, tempy);
           ^~~~~~~~~~~~
/in/compile/ex2.cpp:12:5: error: 'Rectangle' was not declared in this scope
     Rectangle r{m};
     ^~~~~~~~~
/in/compile/ex2.cpp:13:9: error: 'r' was not declared in this scope
     if (r.isRect()) {
         ^

Information

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