Hello. I have a problem with a little c program. I have the Borland C++ 5.5.1 compiler for Win32, and I don't know how do a 'delay'. Also I don't know what function could be equal or similar to kbhit().
Why can't you use kbhit? My help files indicate that it should work in Win32. For example,
Code:
while (!kbhit()) /* do nothing */ ;
should wait until someone hits a key. James P. Cottingham
I am the Unknown lead by the Unknowing.
I have done so much with so little
for so long that I am now qualified
to do anything with nothing.
For the sleep function u need to #include <unistd.h>
I'm not sure if it uses the CPU clock or not, but I don't think so... why? cause I've looked into a clock program and there they don't use sleep(1) to wait a second.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.