+ 1

Pause in C++

Is there a command in C++, that allows you to pause the console for some amount of time? How to use it?

30th Aug 2017, 5:46 AM
Rohnek Kdosi
6 Respostas
+ 5
getch(); for C
30th Aug 2017, 8:07 AM
Abhishek Tandon
Abhishek Tandon - avatar
0
thanks
30th Aug 2017, 5:59 AM
Rohnek Kdosi
0
Include dos.h header file use delay() function where you want to pause an output in parenthesis as a parameter there will be time passed in millisecond that for how much time you want to pause the console or execution eg., delay(5000); It will pause the output or console screen for 5 seconds then after 5 seconds the next step or statement will be executed.
30th Aug 2017, 10:43 AM
Nikhar Sachdeva
Nikhar Sachdeva - avatar
0
And if you want to wait the console screen to wait for you to enter a character before next instruction.then use getch() function that is in conio.h so include that also if you are using Borland tc 3.0
30th Aug 2017, 10:46 AM
Nikhar Sachdeva
Nikhar Sachdeva - avatar
0
thank you
30th Aug 2017, 11:02 AM
Rohnek Kdosi