Mar 20, 2011 at 9:01pm UTC
I need to know how to make a program that waits for 2 seconds.
do you have an example?
Mar 20, 2011 at 9:05pm UTC
sure
wait(2);
now you just need to make the function =)
Mar 20, 2011 at 9:38pm UTC
uh is there a file that i need to include?
Mar 20, 2011 at 10:22pm UTC
It dose not werk. do you have eny more ideas?
Mar 20, 2011 at 10:33pm UTC
What is your OS? If you use POSIX systems, you can use the sleep() function.
Mar 20, 2011 at 10:34pm UTC
You could look into the <ctime> library. Using it you should be able to make your program wait.
Mar 20, 2011 at 10:50pm UTC
I steel can't get it to werk with <ctime>
Mar 20, 2011 at 10:53pm UTC
The <ctime> library doesn't have a wait function. The suggestion by ultifinitus was to write your own wait function. I was saying that you could use the <ctime> library to do this.
Mar 20, 2011 at 11:39pm UTC
His OS is Windows. #include<windows.h> and Sleep() should work.
Mar 21, 2011 at 10:23pm UTC
oh I did not notice that I'm sopposedto capitolize the S in the Sleep command.