thanks Eiranos and Marius  
Author Message
aaegh5





PostPosted: Visual C++ Language, thanks Eiranos and Marius Top

When i hit on F5 or debug after compiling, the command prompt window only appears in a flash...it lasts only some few seconds then disappears...However, when i use CTRL+F5, the command promt window stays...is there any cause for this behavior

Visual C++13  
 
 
Sarath.





PostPosted: Visual C++ Language, thanks Eiranos and Marius Top

Your question and subjects are not matching either.
I thought this is a thanks post.
This forum is dealing about language issues rather than the IDE and de****. There's a forum in MSDN itself which is dedicated for debugging.

In my understanding, when you press F5 the de**** the spawns the application and process exits on returning the main function (exiting main thread). The same thing is happened when you are directly opens the from the location.
But while you press Ctrl+F5, the IDE Spawns vcspawn.exe to launch your program. It is one of the external tool supplied with Visual Studio. It is doing something like you are executing your exe in DOS system. Anyway I dont know more about VCSpawn.exe in detail.


 
 
Marius Bancila





PostPosted: Visual C++ Language, thanks Eiranos and Marius Top

Yes, that's how it behaves. However, all that will change if you put this line of code at the end of main (just before the return)

system ("pause");