#include "stdafx.h"//include podkluchaem
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
setlocale(LC_ALL,"RUS");
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 : -> ";
cin>>nazva;
cout<<"Wedt the author of the books : -> ";
cin>>avtor;
cout<<"Widt year vidana books : -> ";
cin>>god;
cout<<"Widt category books : -> ";
cin>>kategoria;
cout<<"";
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>
int main()
{
system("chcp 1251 > nul");
// code ...
Find more questions by tags C++
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