Hello everyone, I have a problem with this code, why when I enter Russian characters, all sorts of characters are displayed in my console and not what I entered earlier?
#include <iostream>
using namespace std;
int main() {
srand(time(NULL));
setlocale(LC_ALL, "");
cout << "How many students do you want to enroll?" << endl;
int number = 0;
int size = 25;
cin >> number;
getchar();
char** list = new char* [number];
for (int i = 0; i < number; i++) {
list[i] = new char[size];
cout << "Enter the name of " << i + 1 << "th student" << endl;
cin.getline(list[i], size);
}
for (int i = 0; i < number; i++) {
cout << "Name" << i + 1 << "th student" << list[i] << endl;
}
}