Pause execution?

D

desktop

Is there someway to pause the execution of a program? I have a large
while loop and before it gets started I would like to pause the program
so I can see the output before it gets overwritten by the loop.
 
V

Victor Bazarov

desktop said:
Is there someway to pause the execution of a program? I have a large
while loop and before it gets started I would like to pause the
program so I can see the output before it gets overwritten by the
loop.

Have an input statement there, something like

{ std::string blah;
std::cout << "pausing, press enter..." << std::flush;
std::cin >> blah; }

Next time, please read the FAQ, it's there.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top