divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task05_convexhull (Балдин) #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
\baldin_dima\task05_convexhull

Original issue reported on code.google.com by dmitryba...@gmail.com on 17 Apr 2013 at 12:49

GoogleCodeExporter commented 9 years ago
0. Пробую собрать. Получаю ацкий вывод об 
ошибках и варнингах:
ConvexHull.cpp: In member function 'void GrahamScan::ToRead()':
ConvexHull.cpp:55:21: warning: format '%d' expects argument of type 'int*', but 
argument 3 has type 'size_t* {aka long unsigned int*}' [-Wformat]
ConvexHull.cpp:55:21: warning: format '%d' expects argument of type 'int*', but 
argument 3 has type 'size_t* {aka long unsigned int*}' [-Wformat]
ConvexHull.cpp: In member function 'void GrahamScan::ToPrint(std::string&)':
ConvexHull.cpp:119:81: warning: format '%d' expects argument of type 'int', but 
argument 3 has type 'size_t {aka long unsigned int}' [-Wformat]
ConvexHull.cpp:119:81: warning: format '%d' expects argument of type 'int', but 
argument 3 has type 'size_t {aka long unsigned int}' [-Wformat]
ConvexHull.cpp: In function 'int main()':
ConvexHull.cpp:127:34: error: no matching function for call to 
'GrahamScan::GrahamScan(std::string)'
ConvexHull.cpp:127:34: note: candidates are:
ConvexHull.cpp:45:2: note: GrahamScan::GrahamScan(std::string&)
ConvexHull.cpp:45:2: note:   no known conversion for argument 1 from 
'std::string {aka std::basic_string<char>}' to 'std::string& {aka 
std::basic_string<char>&}'
ConvexHull.cpp:39:7: note: GrahamScan::GrahamScan(const GrahamScan&)
ConvexHull.cpp:39:7: note:   no known conversion for argument 1 from 
'std::string {aka std::basic_string<char>}' to 'const GrahamScan&'
ConvexHull.cpp:39:7: note: GrahamScan::GrahamScan(GrahamScan&&)
ConvexHull.cpp:39:7: note:   no known conversion for argument 1 from 
'std::string {aka std::basic_string<char>}' to 'GrahamScan&&'
ConvexHull.cpp:129:32: error: no matching function for call to 
'GrahamScan::ToPrint(std::string)'
ConvexHull.cpp:129:32: note: candidate is:
ConvexHull.cpp:113:7: note: void GrahamScan::ToPrint(std::string&)
ConvexHull.cpp:113:7: note:   no known conversion for argument 1 from 
'std::string {aka std::basic_string<char>}' to 'std::string& {aka 
std::basic_string<char>&}'
In file included from /opt/local/include/gcc47/c++/bits/stl_pair.h:61:0,
                 from /opt/local/include/gcc47/c++/bits/stl_algobase.h:65,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/move.h: In instantiation of 'void 
std::swap(_Tp&, _Tp&) [with _Tp = TPoint]':
ConvexHull.cpp:70:30:   required from here
/opt/local/include/gcc47/c++/bits/move.h:177:7: error: no match for 'operator=' 
in '__a = std::move<TPoint&>((* & __b))'
/opt/local/include/gcc47/c++/bits/move.h:177:7: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/stl_pair.h:61:0,
                 from /opt/local/include/gcc47/c++/bits/stl_algobase.h:65,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/move.h:178:7: error: no match for 'operator=' 
in '__b = std::move<TPoint&>((* & __tmp))'
/opt/local/include/gcc47/c++/bits/move.h:178:7: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h: In instantiation of 'void 
std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >]':
/opt/local/include/gcc47/c++/bits/stl_algo.h:2237:4:   required from 'void 
std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5478:4:   required from 'void 
std::sort(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
ConvexHull.cpp:78:40:   required from here
/opt/local/include/gcc47/c++/bits/stl_algo.h:2168:8: error: no match for 
'operator=' in '__first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >() = std::move<TPoint&>((* 
& __val))'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2168:8: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h: In instantiation of 
'_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, 
_RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >; _Tp = TPoint]':
/opt/local/include/gcc47/c++/bits/stl_algo.h:2309:70:   required from 
'_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, 
_RandomAccessIterator) [with _RandomAccessIterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2340:54:   required from 'void 
std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) 
[with _RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >; _Size = long int]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5476:4:   required from 'void 
std::sort(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
ConvexHull.cpp:78:40:   required from here
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: error: no match for 
'operator<' in '__first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >() < __pivot'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note: candidates are:
ConvexHull.cpp:25:7: note: bool TPoint::operator<(TPoint&)
ConvexHull.cpp:25:7: note:   no known conversion for argument 1 from 'const 
TPoint' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:65:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_pair.h:212:5: note: template<class _T1, 
class _T2> constexpr bool std::operator<(const std::pair<_T1, _T2>&, const 
std::pair<_T1, _T2>&)
/opt/local/include/gcc47/c++/bits/stl_pair.h:212:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::pair<_T1, _T2>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:299:5: note: template<class 
_Iterator> bool std::operator<(const std::reverse_iterator<_Iterator>&, const 
std::reverse_iterator<_Iterator>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:299:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::reverse_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:349:5: note: template<class 
_IteratorL, class _IteratorR> bool std::operator<(const 
std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:349:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::reverse_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1057:5: note: template<class 
_IteratorL, class _IteratorR> bool std::operator<(const 
std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1057:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::move_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1063:5: note: template<class 
_Iterator> bool std::operator<(const std::move_iterator<_Iterator>&, const 
std::move_iterator<_Iterator>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1063:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::move_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2566:5: note: template<class 
_CharT, class _Traits, class _Alloc> bool std::operator<(const 
std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, 
_Traits, _Alloc>&)
/opt/local/include/gcc47/c++/bits/basic_string.h:2566:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2578:5: note: template<class 
_CharT, class _Traits, class _Alloc> bool std::operator<(const 
std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
/opt/local/include/gcc47/c++/bits/basic_string.h:2578:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2590:5: note: template<class 
_CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const 
std::basic_string<_CharT, _Traits, _Alloc>&)
/opt/local/include/gcc47/c++/bits/basic_string.h:2590:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   mismatched types 
'const _CharT*' and 'TPoint'
In file included from /opt/local/include/gcc47/c++/deque:65:0,
                 from /opt/local/include/gcc47/c++/stack:61,
                 from ConvexHull.cpp:3:
/opt/local/include/gcc47/c++/bits/stl_deque.h:274:5: note: template<class _Tp, 
class _Ref, class _Ptr> bool std::operator<(const std::_Deque_iterator<_Tp, 
_Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)
/opt/local/include/gcc47/c++/bits/stl_deque.h:274:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
In file included from /opt/local/include/gcc47/c++/deque:65:0,
                 from /opt/local/include/gcc47/c++/stack:61,
                 from ConvexHull.cpp:3:
/opt/local/include/gcc47/c++/bits/stl_deque.h:282:5: note: template<class _Tp, 
class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator<(const 
std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, 
_PtrR>&)
/opt/local/include/gcc47/c++/bits/stl_deque.h:282:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
In file included from /opt/local/include/gcc47/c++/deque:65:0,
                 from /opt/local/include/gcc47/c++/stack:61,
                 from ConvexHull.cpp:3:
/opt/local/include/gcc47/c++/bits/stl_deque.h:1947:5: note: template<class _Tp, 
class _Alloc> bool std::operator<(const std::deque<_Tp, _Alloc>&, const 
std::deque<_Tp, _Alloc>&)
/opt/local/include/gcc47/c++/bits/stl_deque.h:1947:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::deque<_Tp, _Alloc>'
In file included from /opt/local/include/gcc47/c++/stack:62:0,
                 from ConvexHull.cpp:3:
/opt/local/include/gcc47/c++/bits/stl_stack.h:260:5: note: template<class _Tp, 
class _Seq> bool std::operator<(const std::stack<_Tp, _Seq>&, const 
std::stack<_Tp, _Seq>&)
/opt/local/include/gcc47/c++/bits/stl_stack.h:260:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::stack<_Tp, _Seq>'
In file included from /opt/local/include/gcc47/c++/vector:65:0,
                 from ConvexHull.cpp:4:
/opt/local/include/gcc47/c++/bits/stl_vector.h:1387:5: note: template<class 
_Tp, class _Alloc> bool std::operator<(const std::vector<_Tp, _Alloc>&, const 
std::vector<_Tp, _Alloc>&)
/opt/local/include/gcc47/c++/bits/stl_vector.h:1387:5: note:   template 
argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::vector<_Tp, _Alloc>'
In file included from /opt/local/include/gcc47/c++/functional:56:0,
                 from /opt/local/include/gcc47/c++/bits/stl_algo.h:68,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/tuple:808:5: note: template<class ... _TElements, 
class ... _UElements> bool std::operator<(const std::tuple<_Elements ...>&, 
const std::tuple<_Elements ...>&)
/opt/local/include/gcc47/c++/tuple:808:5: note:   template argument 
deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_algo.h:2268:4: note:   'TPoint' is not 
derived from 'const std::tuple<_Elements ...>'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2271:4: error: passing 'const 
TPoint' as 'this' argument of 'bool TPoint::operator<(TPoint&)' discards 
qualifiers [-fpermissive]
In file included from /opt/local/include/gcc47/c++/bits/stl_algo.h:63:0,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_heap.h: In instantiation of 'void 
std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, 
_RandomAccessIterator) [with _RandomAccessIterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]':
/opt/local/include/gcc47/c++/bits/stl_algo.h:1962:4:   required from 'void 
std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, 
_RandomAccessIterator) [with _RandomAccessIterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5324:7:   required from 'void 
std::partial_sort(_RAIter, _RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2335:8:   required from 'void 
std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) 
[with _RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >; _Size = long int]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5476:4:   required from 'void 
std::sort(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
ConvexHull.cpp:78:40:   required from here
/opt/local/include/gcc47/c++/bits/stl_heap.h:263:7: error: no match for 
'operator=' in '__result.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >() = std::move<TPoint&>((* 
& __first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >()))'
/opt/local/include/gcc47/c++/bits/stl_heap.h:263:7: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/char_traits.h:41:0,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_algobase.h: In instantiation of 'static 
_OI std::__copy_move<true, false, 
std::random_access_iterator_tag>::__copy_m(_II, _II, _OI) [with _II = TPoint*; 
_OI = TPoint*]':
/opt/local/include/gcc47/c++/bits/stl_algobase.h:384:70:   required from '_OI 
std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = true; _II = TPoint*; _OI 
= TPoint*]'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:422:39:   required from '_OI 
std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = true; _II = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >; _OI = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:486:47:   required from '_OI 
std::move(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >; _OI = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/vector.tcc:139:2:   required from 
'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, 
_Alloc>::erase(std::vector<_Tp, _Alloc>::iterator) [with _Tp = TPoint; _Alloc = 
std::allocator<TPoint>; std::vector<_Tp, _Alloc>::iterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >; typename 
std::_Vector_base<_Tp, _Alloc>::pointer = TPoint*]'
ConvexHull.cpp:83:45:   required from here
/opt/local/include/gcc47/c++/bits/stl_algobase.h:348:8: error: no match for 
'operator=' in '* __result = std::move<TPoint&>((* __first))'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:348:8: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/stl_algo.h:63:0,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_heap.h: In instantiation of 'void 
std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >; _Distance = long int; _Tp = TPoint]':
/opt/local/include/gcc47/c++/bits/stl_heap.h:402:4:   required from 'void 
std::make_heap(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:1959:7:   required from 'void 
std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, 
_RandomAccessIterator) [with _RandomAccessIterator = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5324:7:   required from 'void 
std::partial_sort(_RAIter, _RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2335:8:   required from 'void 
std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) 
[with _RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >; _Size = long int]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5476:4:   required from 'void 
std::sort(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
ConvexHull.cpp:78:40:   required from here
/opt/local/include/gcc47/c++/bits/stl_heap.h:238:4: error: no match for 
'operator=' in '__first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator+<TPoint*, std::vector<TPoint> >((*(const 
difference_type*)(& __holeIndex))).__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >() = std::move<TPoint&>((* 
& __first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator+<TPoint*, std::vector<TPoint> >((*(const 
difference_type*)(& __secondChild))).__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >()))'
/opt/local/include/gcc47/c++/bits/stl_heap.h:238:4: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/stl_algo.h:63:0,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from ConvexHull.cpp:7:
/opt/local/include/gcc47/c++/bits/stl_heap.h:244:4: error: no match for 
'operator=' in '__first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator+<TPoint*, std::vector<TPoint> >((*(const 
difference_type*)(& __holeIndex))).__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator*<TPoint*, std::vector<TPoint> >() = std::move<TPoint&>((* 
& __first.__gnu_cxx::__normal_iterator<_Iterator, 
_Container>::operator+<TPoint*, std::vector<TPoint> >((* &(__secondChild + 
-1l))).__gnu_cxx::__normal_iterator<_Iterator, _Container>::operator*<TPoint*, 
std::vector<TPoint> >()))'
/opt/local/include/gcc47/c++/bits/stl_heap.h:244:4: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'
In file included from /opt/local/include/gcc47/c++/bits/char_traits.h:41:0,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from ConvexHull.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_algobase.h: In instantiation of 'static 
_BI2 std::__copy_move_backward<true, false, 
std::random_access_iterator_tag>::__copy_move_b(_BI1, _BI1, _BI2) [with _BI1 = 
TPoint*; _BI2 = TPoint*]':
/opt/local/include/gcc47/c++/bits/stl_algobase.h:581:18:   required from '_BI2 
std::__copy_move_backward_a(_BI1, _BI1, _BI2) [with bool _IsMove = true; _BI1 = 
TPoint*; _BI2 = TPoint*]'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:590:34:   required from '_BI2 
std::__copy_move_backward_a2(_BI1, _BI1, _BI2) [with bool _IsMove = true; _BI1 
= __gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >; _BI2 = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:661:15:   required from '_BI2 
std::move_backward(_BI1, _BI1, _BI2) [with _BI1 = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >; _BI2 = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2167:8:   required from 'void 
std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:2237:4:   required from 'void 
std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with 
_RandomAccessIterator = __gnu_cxx::__normal_iterator<TPoint*, 
std::vector<TPoint> >]'
/opt/local/include/gcc47/c++/bits/stl_algo.h:5478:4:   required from 'void 
std::sort(_RAIter, _RAIter) [with _RAIter = 
__gnu_cxx::__normal_iterator<TPoint*, std::vector<TPoint> >]'
ConvexHull.cpp:78:40:   required from here
/opt/local/include/gcc47/c++/bits/stl_algobase.h:546:6: error: no match for 
'operator=' in '* -- __result = std::move<TPoint&>((*(-- __last)))'
/opt/local/include/gcc47/c++/bits/stl_algobase.h:546:6: note: candidate is:
ConvexHull.cpp:14:9: note: TPoint TPoint::operator=(TPoint&)
ConvexHull.cpp:14:9: note:   no known conversion for argument 1 from 
'std::remove_reference<TPoint&>::type {aka TPoint}' to 'TPoint&'

1. Приведение const char* к string с помощью (string) - оч 
грубая ошибка. Во-первых, мы договорились 
такое приведение не использовать.
Если же используете, то успользуйте умеючи. 
Во-вторых, можно ведь просто 
сконструировать string из const char*:
  GrahamScan a( string("input.txt") );
Ну а вообще должно работать и такое:
  GrahamScan a("input.txt");

Original comment by aivyu...@gmail.com on 28 Apr 2013 at 6:31

GoogleCodeExporter commented 9 years ago
Вроде всё исправил, сделал без файлов.

Original comment by dmitryba...@gmail.com on 18 May 2013 at 3:16

GoogleCodeExporter commented 9 years ago
Запускаю Вашу программу. Получаю ответ:
-9582 -7762
-9727 -3551
-9501 8751
-8999 9953
9088 9737
9203 -8407
6990 -9051
-9075 -9840

Ответ неверный. Пруфпик во вложении.

Original comment by aivyu...@gmail.com on 19 May 2013 at 10:51

Attachments:

GoogleCodeExporter commented 9 years ago
Это на вашем тесте, который в svn?

Original comment by dmitryba...@gmail.com on 19 May 2013 at 11:11

GoogleCodeExporter commented 9 years ago
да

Original comment by aivyu...@gmail.com on 19 May 2013 at 11:12

GoogleCodeExporter commented 9 years ago
странно, у меня выводится совершенно 
другое...

Original comment by dmitryba...@gmail.com on 19 May 2013 at 11:13

GoogleCodeExporter commented 9 years ago
1 point: (-9633; -9231)
2 point: (-9840; 3814)
3 point: (-8407; 6530)
4 point: (123; 9088)
5 point: (9723; 9203)
6 point: (9953; -573)
7 point: (9737; -8999)
8 point: (-4973; -9582)
9 point: (-9175; -9727)

Original comment by dmitryba...@gmail.com on 19 May 2013 at 11:15

GoogleCodeExporter commented 9 years ago
я проверил. Этот код лежит в svn

Original comment by dmitryba...@gmail.com on 19 May 2013 at 11:16

GoogleCodeExporter commented 9 years ago
Ну блин. Я пишу в консоли:
./x < in1.txt
Получаю:
1 point: (-9582; -7762)
2 point: (-9727; -3551)
3 point: (-9501; 8751)
4 point: (-8999; 9953)
5 point: (9088; 9737)
6 point: (9203; -8407)
7 point: (6990; -9051)
8 point: (-9075; -9840)

Читаю код, а там первой строчкой читается 
размер. В задании ведь указан формат 
ввода-вывода.

И еще просьба: форматируйте, пожалуйста, 
вывод так, как указано в задании. Мне 
приходится ручками художества вроде
 1 point: (-9582; -7762)
исправлять на:
 -9582 -7762
чтобы мои тесты проходили.

Решение верное. Решение принято.

Original comment by aivyu...@gmail.com on 19 May 2013 at 11:36