string
and char
are only guaranteed to represent characters in the basic character set - which does not include the Cyrillic alphabet.
Using wstring
and wchar_t
, and adding L
before the string and character literals to indicate that they use wide characters, should allow you to work with those letters.
Also, for portability you need to include <algorithm>
for find
, and give main
a return type of int
.