title: Header guards in C++ and C
body: <p>At <a href="http://www.learncpp.com/cpp-tutorial/110-a-first-look-at-the-preprocessor/" rel="noreferrer">LearnCpp.com | 1.10 — A first look at the preprocessor</a>. Under <strong>Header guards</strong>, there are those code snippets:</p>
  
  <p>add.h:</p>
  
  <pre><code>#include "mymath.h"
  int add(int x, int y);
  </code></pre>
  
  <p>subtract.h:</p>
  
  <pre><code>#include "mymath.h"
  int subtract(int x, int y);
  </code></pre>
  
  <p>main.cpp:</p>
  
  <pre><code>#include "add.h"
  #include "subtract.h"
  </code></pre>
  
  <p>In implementing the <strong>header guard</strong>, it is mentioned as follows:</p>
  
  <pre><code>#ifndef ADD_H
  #define ADD_H
  
  // your declarations here
  
  #endif
  </code></pre>
  
  <ul>
  <li>What could the declaration be here? And, should <code>int main()</code> come after <code>#endif</code>?</li>
  <li>Is adding <code>_H</code> a convention or a must do thing?</li>
  </ul>
  
  <p>Thanks.</p>