classCertificates - question on "sleep"


#1

First want to say that I am loving the book and writing style! This is unlike any other programming book I’ve read in the past, which means to say that I am really enjoying it.

In the main function I added the sleep(2); call and get the warning for implicit declaration as described in the book. However, I continue to get the ‘implicit declaration’ even after adding “#include <stdlib.h>” (see screenshot below).

Can you tell me why?

Thank you,
Rich


#2

I made a mistake: sleep() is declared in unistd.h.

Add this line to the beginning:


#3

That did it, thanks much!


#4

That was my question too. Ah, thanks! =)