I asked before for a time delay function which is like system ("pause") but depend on time instead of keys , to elaborate i want the program instead if writing " press any key to contiue " i want it to freeze for example for 2 or 3 sec then continue. i got replies which i cant understand, its just codes without explaining the meaning of the function or the input or the output. plz reply me again with more explanation . i really need that facility and i want to understand it.
"NOTE: i am using simple console app with visiual C++ 6 compiler"
thnx
hope u can reply me soon
bye
dooda man
-3
Newbie Poster
Recommended Answers
Jump to PostHey not sleep(2000) bleek, sleep(4) might be a nice number if sleep() is the same for your complier as for mine.I use Borland C++ and sleep() counts in seconds.
There is also delay(int) funtion.It counts in some unit lower than a second.
#include <stdlib.h>
#include <dos.h>(I dont …
Jump to Posti have a good one from my book. :)
#include <iostream.h>
#include <time.h> // my compiler is out dated :) update as needed
int main()
{
cout << "enter delay time, in seconds : ";
float secs;
cin >> secs;
clock_t delay = secs * CLOCKS_PER_SEC …
All 6 Replies
Bleek
0
Light Poster
FireNet
64
Posting Whiz in Training
dooda man
-3
Newbie Poster
Bleek
0
Light Poster
wolfstrike
0
Newbie Poster
Bleek
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.