Hi everyone,

I'm running a c++ program using VS 2010.

But during a debugging, the output DoS window disappears when a problem happens.

How to stop the output window?

I know the problem could be solved by using run-cmd-*.exe. But is there a direct method? I mean, by configuring VS 2010 but not by using the cmd?

Thanks a lot!!

Recommended Answers

All 4 Replies

Sorry, it seems that the description above is not very correct.

I used a lib in my program. The program itself was correct semantically, so the build process is OK. But an overflow happened somewhere during the lib call. So the lib report an error and exit with code 0. The debug window disappears instantly after the overflow.

How can I stop the output dos window even if the program exit with code 0 so that I can see the error report given by the lib.

Thanks a lot a lot!!

Put a breakpoint somewhere in your program to prevent it from closing. There should be an icon on the taskbar that you can click to restore the console window where the error message is.

Add cin.get() just before the return statement.

A simple search would have found this solution in seconds.

commented: Absolutely right. +28

Thank you Ancient Dragon!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.