F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_17746626_6612.cpp: In instantiation of 'TreeNode* buildTree(II, II) [with II = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]':
0_0_17746626_6612.cpp:230:62:   required from here
0_0_17746626_6612.cpp:198:23: error: call of overloaded 'next(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&)' is ambiguous
  II i = next(pre_first);
                       ^
0_0_17746626_6612.cpp:198:23: note: candidates are:
0_0_17746626_6612.cpp:120:4: note: II next(II) [with II = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]
 II next(II begin)
    ^
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++/vector:60,
                 from 0_0_17746626_6612.cpp:114:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note: _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::iterator_traits<_Iter>::difference_type = long long int]
     next(_ForwardIterator __x, typename
     ^
0_0_17746626_6612.cpp:206:41: error: call of overloaded 'next(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&)' is ambiguous
    root->left = buildTree(next(pre_first), next(pre_first, leftSize + 1));
                                         ^
0_0_17746626_6612.cpp:206:41: note: candidates are:
0_0_17746626_6612.cpp:120:4: note: II next(II) [with II = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]
 II next(II begin)
    ^
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++/vector:60,
                 from 0_0_17746626_6612.cpp:114:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note: _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::iterator_traits<_Iter>::difference_type = long long int]
     next(_ForwardIterator __x, typename
     ^
0_0_17746626_6612.cpp:210:40: error: call of overloaded 'next(__gnu_cxx::__normal_iterator<int*, std::vector<int> >&)' is ambiguous
   root->left = buildTree(next(pre_first), pre_last);
                                        ^
0_0_17746626_6612.cpp:210:40: note: candidates are:
0_0_17746626_6612.cpp:120:4: note: II next(II) [with II = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]
 II next(II begin)
    ^
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++/vector:60,
                 from 0_0_17746626_6612.cpp:114:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note: _ForwardIterator std::next(_ForwardIterator, typename std::iterator_traits<_Iter>::difference_type) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; typename std::iterator_traits<_Iter>::difference_type = long long int]
     next(_ForwardIterator __x, typename
     ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-16 09:17:48, Gzip enabled