scrivener.cpp: In function 'void TypeLetter(char)':
scrivener.cpp:15:3: error: reference to 'prev' is ambiguous
15 | prev=s;
| ^~~~
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 scrivener.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:224:5: note: candidates are: 'template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)'
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
scrivener.cpp:5:8: note: 'std::string prev'
5 | string prev,s;
| ^~~~
scrivener.cpp: In function 'void UndoCommands(int)':
scrivener.cpp:22:5: error: reference to 'prev' is ambiguous
22 | s=prev;
| ^~~~
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 scrivener.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:224:5: note: candidates are: 'template<class _BidirectionalIterator> _BidirectionalIterator std::prev(_BidirectionalIterator, typename std::iterator_traits<_Iter>::difference_type)'
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
scrivener.cpp:5:8: note: 'std::string prev'
5 | string prev,s;
| ^~~~