C++: I have this config class that I want to use between all my CPP files, how do I initialize it?
<pre><code>class Config
{
    public:

        static int OUTPUT_TO_FILE;
        static int NEED_TO_TRAIN;
        static int NO_FILE_TRAIN;
        static int NEED_TO_TEST;
}
</code></pre>

<p>Above is my header.h file (i followed: <a href="http://weblogs.asp.net/whaggard/archive/2004/11/05/252685.aspx" rel="nofollow">http://weblogs.asp.net/whaggard/archive/2004/11/05/252685.aspx</a>)</p>

<p>and I want to be able to do things like Config.OUTPUT_TO_FILE = true or variable = Config.NO_FILE_TRAIN;</p>

<p>from any file that includes config.h</p>

<p>I have what I want to do is clear, Just want some variable shared throughout all my cpp files.</p>

<p>EDIT:
I'm having trouble compiling:</p>

<p>In my make file, I added: </p>

<pre><code>hPif : src/main.o src/fann_utils.o src/hashes.o src/config.o # added the config part
    g++ src/main.o src/fann_utils.o src/hashes.o src/config.o -lfann -L/usr/local/lib -o hPif

config.o : src/config.cpp src/config.h
    g++ -c src/config.cpp

.
.
.
main.o: src/main.cpp src/config.h src/main.h src/hashes.h
    g++ -c src/main.cpp
</code></pre>

<p>config.cpp:</p>

<pre><code>#include "config.h"

int OUTPUT_TO_FILE = false;
.
.
.
</code></pre>

<p>config.h:</p>

<pre><code>class Config
{
    public:

        static int OUTPUT_TO_FILE;
.
.
.
</code></pre>

<p>Trying to call by: </p>

<pre><code>#include "config.h"
...

            Config::OUTPUT_TO_FILE = true;
</code></pre>

<p>Error I get: </p>

<pre><code>Undefined Symbols:
  "Config::OUTPUT_TO_FILE", referenced from:
      _main in main.o
      _main in main.o
</code></pre>
