Question:
Visual C++ Debugging Problem?
Paul H
2010-04-13 17:45:38 UTC
Hi all, I just have a question with debugging in VS C++ Express. I took a class on C++ and using VS, the professor showed us how to keep the command prompt open until we hit a key to close it. (I want to see the prompt open long enough until I close it myself) It looked like the run ' > ' button but it had the ability to keep the prompt open. Anyone know where this is? I'm not looking to put 'pause' in my code or looking for breakpoints, etc. Thanks.

Using C++ 2010 Express Ed. but if you know where in the 2008 Ed., that would be enough.
Three answers:
Ratchetr
2010-04-13 17:57:07 UTC
In the Debug menu, use Start Without Debugging.



Or just hit CTRL-F5.



The option isn't in the Debug toolbar by default. You could add it. The icon is 3 horizontal lines on the left, and a triangle on the right. At the far right of the debug menu is a drop down menu icon. From there you can choose Customize and find the Start Without Debugging command and add it.



Probably easier to just learn CTRL-F5.
Tim42
2010-04-13 17:57:18 UTC
F5 is "start debugging." It does not pause on its own. Ctrl + F5 is "start without debugging." It pauses at the end of execution. If you really do want to debug, set a breakpoint or add a Console.ReadLine() or Console.ReadKey() to make it "pause" before exiting. If you don't actually want debugging, Ctrl + F5.
?
2016-09-28 10:36:13 UTC
because of the fact your at the same time as(enter != -999) block is lacking commencing and ending braces. without those, purely the if fact applies to the at the same time as. additionally, contained in the if fact for assigning new minimum or optimum values, you have the strains reversed. you're changing the enter value rather of the cut back values. i choose for to recommend you turn to the OTBS sort of utilising braces if in any respect attainable so it turns into extra handy to work out once you have left a brace off of a fact. (you won't be able to surely and by twist of destiny insert code between a loop/conditional fact and the opening brace that way.)


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...