title: C++ namespaces and defining classes in separate files
body: <p>I want to make a namespace that will contain several classes as part of a "package".</p>
  
  <p>Do I have to declare all of the classes within the namespace?</p>
  
  <p>For example, if I have a "2dEngine.h" which defines the 2dEngine namespace, do I have to declare all of the individual classes within that header file? Or can I still separate them into separate header (.h) files and have them be part of the namespace?</p>
  
  <p>Pseudo example:</p>
  
  <p><strong>TwoEngine.h</strong></p>
  
  <pre><code>namespace TwoEngine
  {
      class Canvas
      {
          // Define all of Canvas here
      };
  
      class Primitive
      {
          // Define all of Primitive here
      };
  }
  </code></pre>
  
  <p>Instead of doing that, I want to have Canvas and Primitive be their own .h files and just somehow state that they are part of that namespace.</p>
  
  <p>Sorry, I'm still pretty new to this.</p>