   keeping program running so can see results
  hi guys, how do i keep my programs open soo i can see results?for instance i made a calculator(very simple) and would like to see the answer to the sums i put in but the console screen closes almost instantly after inputting data, please help me :D   
  I am assuming C++?Try using std::cin.get()#include <iostream>...int main(...){    ...    std::cout << "Press enter to continue" << std::endl;    std::cin.get()};  Your development environment should have an option for keeping the window around until it's closed (for instance, Visual C++ does so by default in certain build configurations). If it doesn't, a simple workaround is to add a debugger breakpoint on the last statement in your program—this doesn't require you to change the program, and has no effect on the program when it's run outside the IDE.   ;  Run your program from the terminal.   ;  If you are using Visual Studio, you have two additional options.You can press CTRL+F5 to build and run your program.  When it is done, the window will stay open.You can also place a breakpoint at the return statement to your main function and then run your code with the debugger.  When the program gets to the end, the program will stop and wait for you to continue at which point you can go back to the output window to make sure everything is okay.   ;Quote:Original post by ToohrVykYour development environment should have an option for keeping the window around until it's closed (for instance, Visual C++ does so by default in certain build configurations). If it doesn't, a simple workaround is to add a debugger breakpoint on the last statement in your program—this doesn't require you to change the program, and has no effect on the program when it's run outside the IDE.Quote:Original post by stonemetalRun your program from the terminal.Quote:Original post by mmakrzemIf you are using Visual Studio, you have two additional options.You can press CTRL+F5 to build and run your program.  When it is done, the window will stay open.You can also place a breakpoint at the return statement to your main function and then run your code with the debugger.  When the program gets to the end, the program will stop and wait for you to continue at which point you can go back to the output window to make sure everything is okay.Do any of these.Alternatively, make a batch file which runs your program, and then runs the 'pause' program.Quote:Original post by YacobyI am assuming C++?Try using std::cin.get()*** Source Snippet Removed ***Please don't do this (nor system("PAUSE"), nor anything else intended to artificially pause your program itself at the end).