Problem letters
User PlayVoltz
Submission Time 2023-08-23 20:24:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

letters.cpp: In function ‘void makenext()’:
letters.cpp:11:2: error: reference to ‘next’ is ambiguous
11 | next['a'] = 'b';
| ^~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:66,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from letters.cpp:1:
/usr/include/c++/9/bits/stl_iterator_base_funcs.h:213:5: note: candidates are: ‘template<class _InputIterator> constexpr _InputIterator std::next(_InputIterator, typename std::iterator_traits<_Iter>::difference_type)’
213 | next(_InputIterator __x, typename
| ^~~~
letters.cpp:8:18: note: ‘std::map<char, char> next’
8 | map <char, char> next;
| ^~~~
letters.cpp:12:2: error: reference to ‘next’ is ambiguous
12 | next['b'] = 'c';