Answer the question
In order to leave comments, you need to log in
Does the program work correctly in Debug mode, but doesn't work in release mode?
Hello everyone, the problem is this: when you compile the code in the debug profile, it works fine, but the text is not displayed in the release profile, but it does the main thing (changes the title of the console).
What to do?
Here is the code:
#include "stdafx.h"
wchar_t OriginalTitle[5000];
wchar_t MyTitle[5000] = L"Супир тайтэль (я нассаль на двигатэль)";
int main(void)
{
_wsetlocale(LC_ALL, L"ru_RU.UTF-8");
setlocale(LC_ALL, "ru_RU.UTF-8");
GetConsoleOriginalTitleW(OriginalTitle, 5000);
wprintf(L"Я получил оригинальный тайтл!\nВот: '%s'\n\n", OriginalTitle);
SetConsoleTitleW(MyTitle);
wprintf(L"Я сменил оригинальный тайтл на: '%s'!\n", MyTitle);
system("pause");
}
Answer the question
In order to leave comments, you need to log in
_wsetlocale(LC_ALL, L"Russian");
setlocale(LC_ALL, "Russian");
And it worked.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question