title: Raspberry Pi C++ Header Documentation
body: <p>Is there some sort of documentation for what kind of headers you can include in c++ files when writing programs for Raspberry Pi or linux in general?</p>
  
  <p>For instance I found this great guide on how to access the SPI bus from the Pi using c++ (<a href="http://hertaville.com/2013/07/24/interfacing-an-spi-adc-mcp3008-chip-to-the-raspberry-pi-using-c/" rel="nofollow noreferrer">http://hertaville.com/2013/07/24/interfacing-an-spi-adc-mcp3008-chip-to-the-raspberry-pi-using-c/</a>)</p>
  
  <p>I was able to take the code and apply it to my situation and was succesfully able to talk to an nRF24L01+ RF module and I am able to command the chip etc.</p>
  
  <p>But as I started trying to investigate what the code does (because I like to know how code that I get from the internet works) I get lost very quickly. For instance how did the author of that code know to include the header files he did:</p>
  
  <pre><code>#include &lt;unistd.h&gt;
  #include &lt;stdint.h&gt;
  #include &lt;fcntl.h&gt;
  #include &lt;sys/ioctl.h&gt;
  #include &lt;linux/spi/spidev.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;errno.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  </code></pre>
  
  <p>I know what the ones such as "iostream" do but I thought I would approach it by Googling those header file names such as ("unistd.h") but no luck. I found lots of info but none pertaining to the Pi, and the little bit I did only started referencing other header files and code. Is this too much to try and learn, like would I effectively be trying to learn the linux kernel? Are there any good books for this type of stuff?</p>
  
  <p>And back to my original question is there any kind of online (or offline for that matter) documentation for what header files you can include in your c++ projects on the Pi and what functionality they all add?</p>
  
  <p>I found this (<a href="http://www.cplusplus.com/reference/" rel="nofollow noreferrer">http://www.cplusplus.com/reference/</a>) which has the standard files, but how do you know about all the non-standard header files and corresponding functionality?</p>
  
  <p>All thoughts and help are appreciated, thanks!
  Wesley</p>
  
  <p>Edit 1</p>
  
  <p>Here is the image showing the output of the "ls /usr/include" command:</p>
  
  <p><img src="https://i.stack.imgur.com/6Pb7H.png" alt="enter image description here"></p>