0_0_17429606_12780.cpp: In function 'double area2(Point&, Point&, Point&)':
0_0_17429606_12780.cpp:27:17: error: invalid initialization of non-const reference of type 'Point&' from an rvalue of type 'Point'
return cross(b - c, a - c);
^
0_0_17429606_12780.cpp:23:8: note: in passing argument 1 of 'double cross(Point&, Point&)'
double cross(Point &a, Point &b){
^
0_0_17429606_12780.cpp: In function 'double dPoint(Point&, Point&)':
0_0_17429606_12780.cpp:38:21: error: no matching function for call to 'abs(Point)'
return sqrt(abs(a-b));
^
0_0_17429606_12780.cpp:38:21: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:72:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
from 0_0_17429606_12780.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/stdlib.h:329:15: note: int abs(int)
int __cdecl abs(int _X);
^
GCC4.9.2/x86_64-w64-mingw32/include/stdlib.h:329:15: note: no known conversion for argument 1 from 'Point' to 'int'
0_0_17429606_12780.cpp:30:8: note: double abs(Point&)
double abs(Point &a){
^
0_0_17429606_12780.cpp:30:8: note: no known conversion for argument 1 from 'Point' to 'Point&'
In file included from 0_0_17429606_12780.cpp:2:0:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:99:5: note: template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp)
abs(_Tp __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:99:5: note: template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath: In substitution of 'template<class _Tp> constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = Point]':
0_0_17429606_12780.cpp:38:21: required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:99:5: error: no type named '__type' in 'struct __gnu_cxx::__enable_if<false, double>'
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: constexpr long double std::abs(long double)
abs(long double __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:91:3: note: no known conversion for argument 1 from 'Point' to 'long double'
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: constexpr float std::abs(float)
abs(float __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:87:3: note: no known conversion for argument 1 from 'Point' to 'float'
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: constexpr double std::abs(double)
abs(double __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cmath:81:3: note: no known conversion for argument 1 from 'Point' to 'double'
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/ext/string_conversions.h:41:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/basic_string.h:2850,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/string:52,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/locale_classes.h:40,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/ios_base.h:41,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:42,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ostream:38,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/iostream:39,
from 0_0_17429606_12780.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:174:3: note: no known conversion for argument 1 from 'Point' to 'long long int'
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/cstdlib:166:3: note: no known conversion for argument 1 from 'Point' to 'long int'
0_0_17429606_12780.cpp: In function 'bool corvLine(Point&, Point&, Point&, Point&)':
0_0_17429606_12780.cpp:56:20: error: invalid initialization of non-const reference of type 'Point&' from an rvalue of type 'Point'
return paraLine(a - b, c - d) && area2(a, b, c);
^
0_0_17429606_12780.cpp:52:6: note: in passing argument 1 of 'bool paraLine(Point&, Point&)'
bool paraLine(Point &a, Point &b){
^
0_0_17429606_12780.cpp: In function 'bool left(Point&, Point&, Point&)':
0_0_17429606_12780.cpp:70:16: error: invalid initialization of non-const reference of type 'Point&' from an rvalue of type 'Point'
return cross(b-a,c-b)>=0;}
^
0_0_17429606_12780.cpp:23:8: note: in passing argument 1 of 'double cross(Point&, Point&)'
double cross(Point &a, Point &b){
^
|