title: Why are #ifndef and #define used in C++ header files?
body: <p>I have been seeing code like this usually in the start of header files:</p>
  
  <pre><code>#ifndef HEADERFILE_H
  #define HEADERFILE_H
  </code></pre>
  
  <p>And at the end of the file is</p>
  
  <pre><code>#endif
  </code></pre>
  
  <p>What is the purpose of this?</p>