Sleep() is a MS function (ok, maybe it's a *nix function too, but I'm not aware of it). sleep() is a *nix function. it operates on seconds, so sleep(1) sleeps for one second.
I can compile the above code with g++ rather than gcc. is there a reason to use gcc? for the record, I tried the above code with both sleep and usleep - both worked when compiling with g++
Last edited by BrianK; 03-13-2008 at 02:07 PM.