user4597972
user4597972

Reputation:

Sleep function doesn't work

I am using Xcode and I have just started using the sleep() function but for some reason Xcode keeps saying Use of undeclared identifier 'sleep'.

Is there anyway around this? (As you can tell I'm quite new to C++)

Upvotes: 7

Views: 8797

Answers (1)

codeduck
codeduck

Reputation: 158

This may be because you haven't introduced the unistd.h header file.

Hope this helps!

Upvotes: 14

Related Questions