Displays kryakozyabry why?

Displays kryakozyabry?how to solve the problem
#include "stdafx.h"//include podkluchaem
#include <stdio.h>
#include <iostream>
 using namespace std;
int main()
 char dani[1024] = {0};//for (reset memory)
 char nazva[1024] = {0};//variable for the name
 char avtor[1024] = {0};//toje samoe
 char god[1024] = {0};
 char kategoria[1024] = {0};
 cout<<"Widt Dan bblogging sources : -> ";
 cin>>dani;// for not restarting the memory
 cout <<"Wedt name lterature sources : -> ";
 cout<<"Wedt the author of the books : -> ";
 cout<<"Widt year vidana books : -> ";
 cout<<"Widt category books : -> ";
 cout<<"Dan bblogging sources : -> "<<dani; cout<<"the Name lterature sources : ->"<<nazva; cout<<"the author of the books : ->"<<avtor; cout<<"the Year vidana books : ->"<<god; cout<<"Category books"<<kategoria; }< code></god;></avtor;></nazva;></dani;></iostream></stdio.h>
June 8th 19 at 16:52
3 answers
June 8th 19 at 16:54
To use the Latin alphabet.
Or search for the toaster - the question "how to display Cyrillic characters in console c++" was asked many times.
I will add that in this question it is important to match the encoding in the source file and the encoding the console if they do not match then you need to transcode. The compiler itself does not transcode. In Windows there are built-in functions for transcoding, especially no need to invent anything.
To change the console encoding is , IMHO, bad form. You need to transcode your output text to the console encoding.
To facilitate the process, I recommend to save the code in UTF-8 for output lines everywhere to use wchar_t.
The last time this issue was discussed here, post it here its function output that encodes the text in the encoding of the console and displays it. Truth is a function on C and not on the pros. - Lucio commented on June 8th 19 at 16:57
June 8th 19 at 16:56
And in what encoding the file is saved?
You can try to do so (if the file encoding is windows 1251):
int main()
 system("chcp 1251 > nul");
 // code ...

setlocale(LC_ALL,"RUS") to remove.
June 8th 19 at 16:58
It may be the case that setlocale(LC_ALL,"RUS") , but the text is Ukrainian letter i. Try setlocale(LC_ALL,"Ukrainian")/

Find more questions by tags C++