pausing a command

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2004
Posts: 28
Reputation: Bleek is an unknown quantity at this point 
Solved Threads: 0
Bleek Bleek is offline Offline
Light Poster

pausing a command

 
1
  #1
Mar 21st, 2004
how do u pause a command in c++? i know how to pause using system("pause") or cin.get() but i want to know hot to make the program sleep for a certain ammount of time... like vbs' wscript.sleep 1000... if that helps

thanx
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: pausing a command

 
0
  #2
Mar 23rd, 2004
linux: sleep() or usleep() #include <unistd.h>
windows: Sleep() #include <time.h>
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 28
Reputation: Bleek is an unknown quantity at this point 
Solved Threads: 0
Bleek Bleek is offline Offline
Light Poster

Re: pausing a command

 
0
  #3
Mar 31st, 2004
I'm really sorry about bringing this up again but the Sleep(); function isnt working for me. i included ctime. could someone give me an example of code for this that works? (I'm using the dev-cpp bloodshed compiler)

thanx...
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: pausing a command

 
0
  #4
Mar 31st, 2004
http://msdn.microsoft.com/library/de...base/sleep.asp

i may have given wrong header, sorry.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 763
Reputation: Phaelax is on a distinguished road 
Solved Threads: 38
Phaelax Phaelax is offline Offline
Master Poster

Re: pausing a command

 
0
  #5
Apr 1st, 2004
ctime.h possibly?
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 77
Reputation: infamous is an unknown quantity at this point 
Solved Threads: 2
infamous infamous is offline Offline
Junior Poster in Training

Re: pausing a command

 
0
  #6
Apr 1st, 2004
that msdn crud says 'windows.h', but i was sure u didnt need to include all that garbage just for sleep...
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 8
Reputation: Aaerox is an unknown quantity at this point 
Solved Threads: 1
Aaerox Aaerox is offline Offline
Newbie Poster

Re: pausing a command

 
0
  #7
Apr 2nd, 2004
Sleep is a kernel32.dll function. All exports of kernel32.dll are typically associated with windows.h.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 219
Reputation: BountyX is an unknown quantity at this point 
Solved Threads: 7
BountyX's Avatar
BountyX BountyX is offline Offline
Code Guru

Re: pausing a command

 
0
  #8
Apr 3rd, 2004
Originally Posted by infamous
that msdn crud says 'windows.h', but i was sure u didnt need to include all that garbage just for sleep...
#define WIN32_LEAN_AND_MEAN
#incldue <windows.h>

that cuts the crud a little
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC