I want to know if this can be done in the latest version of VS by simple configuration somewhere, which leads to the fact that VS will behave as shown in "ContextMenu"> run "a_Java_src_file_with_main" in the Eclipse IDE. I am using the trial version of VS 2010 Pro on the new W7 platform. Even the minimal cpp helloworld source file added to the project generated from the "empty" template is redirected to the command window.
The same question 3 years ago:Capturing cout in Visual Studio 2005 output window?And 9 months ago:How to redirect stdout to output window from visual studio
I know using OutputDebugString (...) and redirecting the stream to a file as an alternative.Capturing console output for debugging in VS?
An easy way to do this is to " close the console window ", the WinMain executable with the WinMain entry WinMain on the windows instead of main .
WinMain
main
This can usually be done by editing the project settings, but if you use cmake , like me, these settings are overwritten every time you invoke the cmake assembly. Thus, in this case, you need to add WIN32 to the executable target in CMakeList.txt or set CMAKE_WIN32_EXECUTABLE to true for the cmake configure command .
cmake
WIN32
CMakeList.txt
CMAKE_WIN32_EXECUTABLE
Source: https://habr.com/ru/post/1386018/More articles:ios sort array with dictionaries - sortingEvaluation of a project using artificial intelligence / neural networks - artificial-intelligenceHow to open c ++ project folder in visual studio? - c ++Sort dictionaries in an array? - sortingCreating divs back in order - javascriptComparing Root-find algorithms (functions) in Python - performanceAS3 MOUSE_OVER problems with movie clip overlapping - flashDefining a scope with a pre-created namespace (C ++) - c ++word matching in php - phpDigest, Basic and Identity - authenticationAll Articles