Just wanted to know how you could make a program sleep. Please give some example code.
ex:
video intro to consol app. (scrolling word art)
thanks
Just wanted to know how you could make a program sleep. Please give some example code.
ex:
video intro to consol app. (scrolling word art)
thanks
Include windows.h in your .cpp
Then when you want to sleep use:Code:#include <windows.h>
Note that the parameter is in miliseconds!Code:Sleep(500);
There's an FAQ on the subject: http://faq.cprogramming.com/cgi-bin/...&id=1043284392
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.