i tried Sleep(x); but that didn't seem to work. At the top i use
#include <iostream.h> in stead of #include <windows.h> will that make a difference?
Printable View
i tried Sleep(x); but that didn't seem to work. At the top i use
#include <iostream.h> in stead of #include <windows.h> will that make a difference?
it makes a very very big difference, if you dont include windows.h it wont work - Sleep is defined in windows.h - so you must include it for it to work
sleep function is in dos.h
I just write my own.
Code:inline void sleep_f (long time)
{
for (int I = 0; I != (time << 2); ++I) ;
}
the Sleep(x) function is in windows.h
i am right
i use this in a lot of applications
edit--
however if you wish to keep your code portable and not OS specific it is a good idea to code your own as above
just create a null loop - stick it in a header and call as you wish