0_0_13679527_12563.cpp: In function 'double Distance(Coordinate&, Coordinate&)':
0_0_13679527_12563.cpp:20:63: error: 'sqrt' was not declared in this scope
return sqrt((a.x - b.x)*(a.x - b.x) + (a.y - b.y)*(a.y - b.y));
^
0_0_13679527_12563.cpp: In function 'int main()':
0_0_13679527_12563.cpp:72:34: error: no matching function for call to 'distance(Coordinate&, Coordinate&)'
sum += distance(b[i], b[i + 1]);
^
0_0_13679527_12563.cpp:72:34: note: candidate is:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
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_13679527_12563.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:114:5: note: template<class _InputIterator> typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator)
distance(_InputIterator __first, _InputIterator __last)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:114:5: note: template argument deduction/substitution failed:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h: In substitution of 'template<class _InputIterator> typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) [with _InputIterator = Coordinate]':
0_0_13679527_12563.cpp:72:34: required from here
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:114:5: error: no type named 'difference_type' in 'struct std::iterator_traits<Coordinate>'
|