Hello! I create a console with this function:
void ConsoleClass::CreateConsole(char *consoleName) { int hConHandle = 0; FILE *fp; AllocConsole(); SetConsoleTitle(consoleName); m_Console = GetStdHandle(STD_OUTPUT_HANDLE); hConHandle = _open_osfhandle(PtrToUlong(m_Console), 0); fp = _fdopen(hConHandle, "w"); *stdout = *fp; setvbuf(stdout, NULL, _IONBF, 0); } In the window, in the WndProc function, when I click on a button, I perform this function and write printf ("Hello% s \ n", buffer). The console is displayed, but no data is displayed.