rings.cpp: In function 'void dfs(int, int)':
rings.cpp:25:13: error: reference to 'ends' is ambiguous
ends = 2;
^~~~
rings.cpp:6:8: note: candidates are: int ends
int n, ends;
^~~~
In file included from /usr/include/c++/7/istream:39:0,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/ostream:602:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)
ends(basic_ostream<_CharT, _Traits>& __os)
^~~~
rings.cpp:27:13: error: reference to 'ends' is ambiguous
ends++;
^~~~
rings.cpp:6:8: note: candidates are: int ends
int n, ends;
^~~~
In file included from /usr/include/c++/7/istream:39:0,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/ostream:602:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)
ends(basic_ostream<_CharT, _Traits>& __os)
^~~~
rings.cpp: In function 'int CountCritical()':
rings.cpp:48:9: error: reference to 'ends' is ambiguous
ends = 0;
^~~~
rings.cpp:6:8: note: candidates are: int ends
int n, ends;
^~~~
In file included from /usr/include/c++/7/istream:39:0,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/ostream:602:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)
ends(basic_ostream<_CharT, _Traits>& __os)
^~~~
rings.cpp:54:23: error: reference to 'ends' is ambiguous
ans += (ok && ends == 2);
^~~~
rings.cpp:6:8: note: candidates are: int ends
int n, ends;
^~~~
In file included from /usr/include/c++/7/istream:39:0,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from rings.cpp:1:
/usr/include/c++/7/ostream:602:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::ends(std::basic_ostream<_CharT, _Traits>&)
ends(basic_ostream<_CharT, _Traits>& __os)
^~~~