static const in classes
<p>I think is an old question but I don't get it.</p>

<p>I have a header routines.h, its functions file routines.cpp and the main file main.cpp.</p>

<p>In the header there is:</p>

<pre><code>class myclass{
public:
static const double a;
void mymethod();
};

const double myclass::a=0.0;
</code></pre>

<p>The routines.cpp contains: <code>#include"routines.h"</code> and then define the methods.</p>

<p>main.cpp also has <code>#include"routines.h"</code>.</p>

<p>This setup gives a link error: a it's already defined. </p>

<pre><code>public: static double const myclass::a" (?a148@myclass@@2NB) already defined in DBFLOWPAR2.obj
</code></pre>

<p>DBFLOWPAR2 is my main file.</p>

<p>If I define the methods in routines.h it works fine, but I don't like that.
What else it's possible? I don't care how the variables are defined, I just want to be able to access myclass.a and find the right value in it.</p>
