title: Namespaces not found by the compiler
body: <p>I have several files, listed just below, wherein I define some namespaces and classes. Then in one of the files I am trying to incorporate the classes from the others. The issue is that the compiler seems to not be able to find my namespaces.</p>
  
  <p>charon.cpp</p>
  
  <p>chin.cpp</p>
  
  <p>chout.cpp</p>
  
  <p>main.cpp</p>
  
  <p>My namespaces are <strong>charon</strong>, <strong>charon_in</strong>, and <strong>charon_out</strong>. The main problems come up on a particular file, <strong><em>charon.cpp</em></strong>, so here is that file and <strong><em>chin.cpp</em></strong> too.</p>
  
  <p>The errors:</p>
  
  <pre><code>g++    -c -g -MMD -MP -MF build/Debug/GNU-Linux-x86/sys/charon.o.d -o build/Debug/GNU-Linux-x86/sys/charon.o sys/charon.cpp
  sys/charon.cpp:6:17: error: ‘charon_in’ is not a namespace-name
  sys/charon.cpp:6:26: error: expected namespace-name before ‘;’ token
  sys/charon.cpp:7:17: error: ‘charon_out’ is not a namespace-name
  sys/charon.cpp:7:27: error: expected namespace-name before ‘;’ token
  sys/charon.cpp:15:5: error: ‘chout_’ does not name a type
  sys/charon.cpp:16:5: error: ‘chin_’ does not name a type
  sys/charon.cpp:31:39: error: ‘chin_’ has not been declared
  sys/charon.cpp:31:55: error: ‘engine_input’ was not declared in this scope
  sys/charon.cpp:32:40: error: ‘chout_’ has not been declared
  sys/charon.cpp:32:57: error: ‘engine_output’ was not declared in this scope
  </code></pre>
  
  <p>charon.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/thread.hpp&gt;
  #include &lt;boost/date_time.hpp&gt;
  
  using namespace std;
  using namespace charon_in;
  using namespace charon_out;
  
  namespace charon
  {
    class charon_
    {
    private:
      chout_ engine_output;
      chin_ engine_input;
      boost::thread input_thread;
      boost::thread output_thread;
      void start_threads();
      void stop_threads();
    public:
      //Methods
  };
  </code></pre>
  
  <p>chin.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;borland/conio.h&gt;
  #include &lt;ncurses.h&gt;
  #include &lt;boost/thread.hpp&gt;
  
  using namespace std;
  using namespace charon;
  using namespace charon_out;
  
  namespace charon_in
  {
    class chin_
    {
    private:
      bool pause;
      charon_* engine;
      inline iostream grab();
    public:
      //Methods
  };
  </code></pre>
  
  <p>I triple checked everything. So I am pretty confident the syntax is correct, but obviously I'm missing some key concept otherwise the compiler wouldn't complain.</p>
  
  <p>(I know putting classes in the cpp files isn't a standard thing to do, but I know it is possible to do it so that's why I chose to try.)</p>
  
  <p>I can't see what mistakes I've made. Any help would be appreciated.</p>