How to find the header file you need

Isshiki🐈
1 min readAug 10, 2020

--

So you want know there is such a function called sleep but you just don’t know which header file you should include so that you can use it. Try this command

man 3 sleep

What I am trying to say is that you can use an index to look up different manual. For example, if you are using a Mac, man <command> opens the man page of a command, or more precisely, a tool, while man 2 <command> opens the BSD System Calls Manual and man 3 <command> the BSD Library Functions Manual. The last two manuals keep detailed information about specific system calls and library functions.

More on this can be found here

--

--

Isshiki🐈
Isshiki🐈

No responses yet