I am using Visual C++ 2005 in my laptop. When I run the program, the answer shows up on the output window (similar to the > command window) and within a second or two the window disappears. How can I fix this problem? The same happens when there is data input. I see the prompt for data input and before I enter the data, the output window disappears.

you have to post code because I can not see your monitor from where I am sitting :)

The most common reason the window closes quickly is because you did not add any code to make the window stop so that you can read it. If you are coding C program then add getchar() before the return statement in main().

But when I run the same program on home PC, there is no problem. The output window stays until I hit the ENTER key.

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.