zoo.cpp: In function 'void dfs(int, int, char)':
zoo.cpp:16:2: error: reference to 'next' is ambiguous
16 | next.push_back({ i,j });
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from zoo.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
zoo.cpp:8:25: note: 'std::vector<std::pair<int, int> > next'
8 | vector<pair<int, int> > next, cur;
| ^~~~
zoo.cpp: At global scope:
zoo.cpp:22:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
22 | main() {
| ^~~~
zoo.cpp: In function 'int main()':
zoo.cpp:30:8: error: reference to 'next' is ambiguous
30 | cur = next;
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from zoo.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
zoo.cpp:8:25: note: 'std::vector<std::pair<int, int> > next'
8 | vector<pair<int, int> > next, cur;
| ^~~~
zoo.cpp:31:2: error: reference to 'next' is ambiguous
31 | next.clear();
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from zoo.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
zoo.cpp:8:25: note: 'std::vector<std::pair<int, int> > next'
8 | vector<pair<int, int> > next, cur;
| ^~~~
zoo.cpp:37:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | for (int k = 0; k < cur.size(); k++) {
| ~~^~~~~~~~~~~~
zoo.cpp:44:9: error: reference to 'next' is ambiguous
44 | cur = next;
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from zoo.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
zoo.cpp:8:25: note: 'std::vector<std::pair<int, int> > next'
8 | vector<pair<int, int> > next, cur;
| ^~~~
zoo.cpp:45:3: error: reference to 'next' is ambiguous
45 | next.clear();
| ^~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from zoo.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: 'template<class _InputIterator> _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)'
213 | next(_InputIterator __x, typename
| ^~~~
zoo.cpp:8:25: note: 'std::vector<std::pair<int, int> > next'
8 | vector<pair<int, int> > next, cur;
| ^~~~