0_0_13781394_20735.cpp: In function 'double calculateArea(polygon&)':
0_0_13781394_20735.cpp:25:21: error: invalid initialization of non-const reference of type 'vector& {aka std::complex<double>&}' from an rvalue of type 'std::complex<double>'
::vector &va = *p - poly[0], &vb = *(p + 1) - poly[0];
^
0_0_13781394_20735.cpp:25:47: error: invalid initialization of non-const reference of type 'vector& {aka std::complex<double>&}' from an rvalue of type 'std::complex<double>'
::vector &va = *p - poly[0], &vb = *(p + 1) - poly[0];
^
0_0_13781394_20735.cpp: In function 'int side_count(line&, int, int)':
0_0_13781394_20735.cpp:58:24: error: invalid initialization of non-const reference of type 'vector& {aka std::complex<double>&}' from an rvalue of type 'std::complex<double>'
::vector &va = l.pb - l.pa, &vb = verties[i] - l.pa;
^
0_0_13781394_20735.cpp:58:49: error: invalid initialization of non-const reference of type 'vector& {aka std::complex<double>&}' from an rvalue of type 'std::complex<double>'
::vector &va = l.pb - l.pa, &vb = verties[i] - l.pa;
^
0_0_13781394_20735.cpp: In function 'int main()':
0_0_13781394_20735.cpp:94:35: error: invalid initialization of non-const reference of type 'polygon& {aka std::vector<std::complex<double> >&}' from an rvalue of type 'polygon {aka std::vector<std::complex<double> >}'
polygon &p = createPolygon(lines);
^
|