I cant get sleep(5) to work is there a special include i have to load?

Recommended Answers

All 4 Replies

Member Avatar for GreenDay2001

Yes windows.h, if you are using windows. And the function name is Sleep() not sleep()

Sleep from windows.h also takes milliseconds, not seconds. Your call would change to Sleep(5000) .

I was going to say that sleep() isn't in section 5 of the manual...

heh heh heh :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.