title: Why do Eclipse-generated header files start with #ifndef and #define?
body: <p>I understand that the #define function is a pre-processor command that basically copies and pastes chunks of code for the lack of a better explanation. What I am not clear about is in the templates for Eclipse header files it inserts:</p>
  
  <pre><code>#ifndef &lt;FileName&gt;_H
  #define &lt;FileName&gt;_H
  
  //Code, definitions etc....
  
  #endif
  </code></pre>
  
  <p>I understand that it is defining a variable to tell something that the file was defined, what I don't know is why? Is this sort of the same thing in PHP as #INCLUDE_ONCE? I tried to search for this on here and Google but I am not quite sure what the nomenclature is for what I want, everything that I found explains what it is, how it works etc...</p>
  
  <h2><strong>EDIT</strong></h2>
  
  <p>Since this is similar to a #include once in PHP, what is the best practice for putting #include statements? I would assume that you would want them inside the #define so they didn't get included if the file was already included is this also correct? If the included files were outside of the #define command wouldn't they be included regardless?</p>