There is an array of Russian letters. It is necessary to work with the elements of this array, as well as with ordinary English letters. I can not find a way to handle Russian characters.

char rus=['а', 'б'...] 

It gives an error, because Russian characters are either a string or something else.

  • five
    Work with characters as with wchar_t - aleks.andr
  • @ aleks.andr is an increased char? - kot_mapku3

1 answer 1

Most likely, your source code is encoded as UTF-8, so Russian letters consist of several bytes. Depending on the requirements of the program, you can switch to single-byte encoding of type cp1251, or you can use the symbolic type wchar_t or there char32_t or char16_t - in a word, multibyte.

So far, judging by the question, I think that a single-byte encoding will be enough for you, so try to start saving the source code not as utf-8.