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
After a bit of googling, I found this solution that does not involve modifying your code. It contains a workaround that involves modifying your .vcxproj file.
To do this from within Microsoft Visual C++ 2010 Express (I'm assuming it is similar for Visual Studio 2010), open your project and navigate to the following menu:
Project->$YOURPROJECTNAME Properties...
->Configuration Properties
->Linker
->System->SubSystem
Then use the dropdown to select Console (/SUBSYSTEM:CONSOLE) and apply the change.
"Start without debugging" should do the right thing now.