#include <iostream>
#include <string>
using namespace std;
int main(){
string s1 = "АБВГД";
string s2 = "ABCDE";
cout << s1 << endl << s2 << endl;
for(int i = 0; i < 5; i++)
s2[i] = s1[i];
cout << s1 << endl << s2 << endl;
return 0;
}
$ g++ ./st.cpp
$ ./a.out
АБВГД
ABCDE
АБВГД
АБ�
In GCC, on modern systems, the default encoding for char string literals is UTF8.