c++ include guards don't work, error : <p>When I compile this code, i get an error "Error LNK2005 "int a" (?a@@3HA) already defined in file.obj
code:
main.cpp:</p>

<pre><code>#include "header.h"
int main()
{
    return 0;
}
</code></pre>

<p>file.cpp:</p>

<pre><code>#include "header.h"
void function()
{

}
</code></pre>

<p>header.h:</p>

<pre><code>#ifndef HEADER
#define HEADER
int a;
#endif
</code></pre>

<p>Thanks in advance</p>
