Question:
How do i get the console window in Visual Studio Express for c++?
frank y
2011-10-22 11:00:36 UTC
so in eclipse theres a console window to show u the input and output, but in visual express, when i run it, it launches the command window looking thing, and after the program finishes it closes it self, so i cant see the output.

is there anyways to get a console output window like the eclipse? or anyways to get the command window to stay instead of closing upon finishing the program?

thanks very much
Three answers:
Techwing
2011-10-22 11:14:07 UTC
You have two options:



1. You can put this statement at the end of the code in your program to hold the window open until you press a key:



system("pause");



2. You can open a console window, put it into the directory where your executable is, then run the program by hand after compiling it by typing the name. This will cause the console window to remain open even after the program stops.
tippetts
2016-11-19 10:13:41 UTC
Visual Studio Console Window
2016-05-16 04:25:20 UTC
I would suggest starting with batch files just make a file .bat in notepad :P


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