July 25th, 2003, 07:06 PM
C++ function question
I have a function that I want to call another function but only after a certain amount of time. Is this possible and if so, I would I do it?
July 25th, 2003, 07:38 PM
With what compiler and under what operating system? For a GUI target or command-line? That can make a lot of difference, since time delays are usually system dependent.
Also, do you want your application to go to sleep during that delay or be doing other things?
July 25th, 2003, 07:51 PM
I'm using Visual C++ running WIN 98SE but the program will be graded on a computer running WIN 2000. Yes this is for school.
This is an ATM program. I have a function that simply displays a good-bye screen after you're done doing your business but I want the program to restart automatically after a few seconds once the good-bye screen is displayed. I know it basically creates an infinte loop but that's what I want.
July 26th, 2003, 12:12 AM
The Win32 API has a Sleep() function:
You should find it in your VC++ help (from which I just copied that prototype) or on the MSDN site.