编译失败:
hugeint.cpp: In function 'BigInteger sqrt(BigInteger&)':hugeint.cpp:269:24: error: no match for 'operator>' in 'operator-((* & right), (* & left)) > min1'hugeint.cpp:269:24: note: candidates are:hugeint.cpp:161:5: note: int operator>(BigInteger&, BigInteger&)hugeint.cpp:161:5: note: no known conversion for argument 1 from 'BigInteger' to 'BigInteger&'/usr/include/c++/4.6/bits/stl_stack.h:271:5: note: template<class _Tp, class _Seq> bool std::operator>(const std::stack<_Tp, _Seq>&, const std::stack<_Tp, _Seq>&)/usr/include/c++/4.6/bits/stl_queue.h:296:5: note: template<class _Tp, class _Seq> bool std::operator>(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)/usr/include/c++/4.6/bits/stl_deque.h:1950:5: note: template<class _Tp, class _Alloc> bool std::operator>(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)/usr/include/c++/4.6/bits/stl_deque.h:294:5: note: template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator>(const std::_Deque_iterator<_Tp, _RefL, _PtrL>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)/usr/include/c++/4.6/bits/stl_deque.h:287: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>&)/usr/include/c++/4.6/bits/stl_multimap.h:831:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_map.h:913:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_multiset.h:710:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator>(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_set.h:727:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator>(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_tree.h:883:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator>(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_vector.h:1303:5: note: template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)/usr/include/c++/4.6/bits/basic_string.h:2571:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)/usr/include/c++/4.6/bits/basic_string.h:2559:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)/usr/include/c++/4.6/bits/basic_string.h:2547: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>&)/usr/include/c++/4.6/bits/stl_iterator.h:353:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)/usr/include/c++/4.6/bits/stl_iterator.h:303:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)/usr/include/c++/4.6/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)hugeint.cpp:271:26: error: no match for 'operator/' in 'operator+((* & left), (* & right)) / 2'hugeint.cpp:271:26: note: candidate is:hugeint.cpp:241:12: note: BigInteger operator/(BigInteger&, int)hugeint.cpp:241:12: note: no known conversion for argument 1 from 'BigInteger' to 'BigInteger&'
hugeint.cpp: In function 'BigInteger sqrt(BigInteger&)':hugeint.cpp:269:24: error: no match for 'operator>' in 'operator-((* & right), (* & left)) > min1'hugeint.cpp:269:24: note: candidates are:hugeint.cpp:161:5: note: int operator>(BigInteger&, BigInteger&)hugeint.cpp:161:5: note: no known conversion for argument 1 from 'BigInteger' to 'BigInteger&'/usr/include/c++/4.6/bits/stl_stack.h:271:5: note: template<class _Tp, class _Seq> bool std::operator>(const std::stack<_Tp, _Seq>&, const std::stack<_Tp, _Seq>&)/usr/include/c++/4.6/bits/stl_queue.h:296:5: note: template<class _Tp, class _Seq> bool std::operator>(const std::queue<_Tp, _Seq>&, const std::queue<_Tp, _Seq>&)/usr/include/c++/4.6/bits/stl_deque.h:1950:5: note: template<class _Tp, class _Alloc> bool std::operator>(const std::deque<_Tp, _Alloc>&, const std::deque<_Tp, _Alloc>&)/usr/include/c++/4.6/bits/stl_deque.h:294:5: note: template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> bool std::operator>(const std::_Deque_iterator<_Tp, _RefL, _PtrL>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)/usr/include/c++/4.6/bits/stl_deque.h:287: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>&)/usr/include/c++/4.6/bits/stl_multimap.h:831:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>(const std::multimap<_Key, _Tp, _Compare, _Alloc>&, const std::multimap<_Key, _Tp, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_map.h:913:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> bool std::operator>(const std::map<_Key, _Tp, _Compare, _Alloc>&, const std::map<_Key, _Tp, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_multiset.h:710:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator>(const std::multiset<_Key, _Compare, _Alloc>&, const std::multiset<_Key, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_set.h:727:5: note: template<class _Key, class _Compare, class _Alloc> bool std::operator>(const std::set<_Key, _Compare, _Alloc>&, const std::set<_Key, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_tree.h:883:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> bool std::operator>(const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, const std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&)/usr/include/c++/4.6/bits/stl_vector.h:1303:5: note: template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)/usr/include/c++/4.6/bits/basic_string.h:2571:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)/usr/include/c++/4.6/bits/basic_string.h:2559:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)/usr/include/c++/4.6/bits/basic_string.h:2547: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>&)/usr/include/c++/4.6/bits/stl_iterator.h:353:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)/usr/include/c++/4.6/bits/stl_iterator.h:303:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)/usr/include/c++/4.6/bits/stl_pair.h:220:5: note: template<class _T1, class _T2> bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)hugeint.cpp:271:26: error: no match for 'operator/' in 'operator+((* & left), (* & right)) / 2'hugeint.cpp:271:26: note: candidate is:hugeint.cpp:241:12: note: BigInteger operator/(BigInteger&, int)hugeint.cpp:241:12: note: no known conversion for argument 1 from 'BigInteger' to 'BigInteger&'