I\'m trying out Visual studio 2010 by compiling a C program. After it displays the solution in the \"DOS\" command window, the window is immediately closed. In Visual studio 200
The reason this happens is because now in VS 2010 it is possible to create an empty, generic C++ project by default, without having to go through the wizard. This causes VS 2010 to not properly set the Console (/SUBSYSTEM:CONSOLE)
flag and so VS2010 has no idea it is a console application for which it would send the usual "Press any key..." prompt.
This problem doesn't occur if you create a Console Application project type from the New Project menu.
But then you can set this flag yourself and many others, through Project/Settings, as the above post has answered correctly!