Answer the question
In order to leave comments, you need to log in
Why is the Cyrillic alphabet crooked in VC++?
Hello.
The problem is that the Cyrillic alphabet is crooked.
For example:
#include <iostream>
#include <string>
#include <locale.h>
using namespace std;
class employee{
private:
string name;
long number;
public:
void getdata();
void putdata();
};
int main(){
setlocale(LC_ALL, "Russian");
employee em1, em2;
em1.getdata();
em2.getdata();
em1.putdata();
em2.putdata();
system("pause");
return 0;
}
void employee::getdata(){
cout << "Введите имя: "; cin >> name;
cout << "Введите номер: "; cin >> number;
}
void employee::putdata(){
cout << name << endl
<< number << endl;
}
Answer the question
In order to leave comments, you need to log in
Due to the fact that cmd has an old encoding. The best solution is to use only English. You won't be using console projects anyway.
Fix console, set console to normal fonts. Use conemu as default console.
The problem is with the encoding.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question