Answer the question
In order to leave comments, you need to log in
Cyrillic strings in c++?
Why is the error "character too large for enclosing character literal type" displayed when using Cyrillic, but everything is fine in Latin? Why does Cyrillic take up more space?
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
char m[] = {'э', 'м'};
return 0;
}
Answer the question
In order to leave comments, you need to log in
Because Cyrillic, like all utf-8 in general, takes 2 bytes in memory in most versions of compilers, while Latin takes one byte, which corresponds to the basic numeric type in memory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question