title: error: expected ', ' or ' ;' before 'namespace'
body: <p>I'm very new to C++ and I have no clue why but whenever I try to run my program I get the following error:</p>
  
  <pre><code>error: expected ', ' or ' ;' before 'namespace'
  </code></pre>
  
  <p>I'm pretty sure the <code>using namespace std;</code> line in the below file is causing the problem but I'm not sure how to fix it.</p>
  
  <p>Main.cpp</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  #include "Helper.h"
  #include "KeyConstants.h"
  #include "Base64.h"
  
  using namespace std;
  
  int main()
  {
      MSG Msg;
  
      while(GetMessage (&amp;Msg, NULL, 0, 0))
      {
          TranslateMessage(&amp;Msg);
          DispatchMessage(&amp;Msg);
      }
      return 0;
  }
  </code></pre>
  
  <p>It also opens a file called <code>stl_construct.h</code> and tells me the error is from <code>namespace std _GLIBCXX_VISIBILITY(default)</code> in that file. I'm pretty sure this isn't the problem but just in case I'll add some of it.</p>
  
  <p>Excerpt from <code>stl_construct.h</code>:</p>
  
  <pre><code>#ifndef _STL_CONSTRUCT_H
  #define _STL_CONSTRUCT_H 1
  
  #include &lt;new&gt;
  #include &lt;bits/move.h&gt;
  #include &lt;ext/alloc_traits.h&gt;
  
  namespace std _GLIBCXX_VISIBILITY(default)
  {
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
  
  /**
  * Constructs an object in existing memory by invoking an allocated
  * object's constructor with an initializer.
  */
  #if __cplusplus &gt;= 201103L
    template&lt;typename _T1, typename... _Args&gt;
      inline void
      _Construct(_T1* __p, _Args&amp;&amp;... __args)
      { ::new(static_cast&lt;void*&gt;(__p)) _T1(std::forward&lt;_Args&gt;(__args)...); }
  #else
    template&lt;typename _T1, typename _T2&gt;
      inline void
      _Construct(_T1* __p, const _T2&amp; __value)
      {
        // _GLIBCXX_RESOLVE_LIB_DEFECTS
        // 402. wrong new expression in [some_]allocator::construct
        ::new(static_cast&lt;void*&gt;(__p)) _T1(__value);
      }
  #endif
  </code></pre>
  
  <p>Base64.h</p>
  
  <pre><code>#ifndef BASE64_H
  #define BASE64_H
  
  #include &lt;vector&gt;
  #include &lt;string&gt;
  
  namespace Base64
  {
      std::string base64_encode(const std::string &amp;);
  
      const std::string &amp;SALT1 = "LM::&amp;&amp;jARLZ_E5?u ;f9+,4AZwA8MF3t(t+T+   {o!g,Ze22Pu&amp;6$GbROk-* LzIxb?d'";
      const std::string &amp;SALT2 = "'hytO|-h0,Rb@6Z{iH=H=+Q:E{+Y:&amp;&lt;rzP!^;oIC!.OGk5o6)^S^1-o,UcLt(`kQx'?";
      const std::string &amp;SALT3 = "FU%^L,RHo({KD~[iZ/7Y%EehTkaE6^jwYQXwR#5Qh|c?)m?CGC(j-&amp;oG~laZclg?Q'!";
  
  
      std::string EncryptB64(std::string s)
      {
          s = SALT1 + s + SALT3 + SALT2;
          s = base64_encode(s);
          s.insert(15, SALT1);
          s += SALT3;
          s = base64_encode(s);
          s = SALT3 + SALT1 + SALT2;
          s = base64_encode(s);
          s.insert(7, "t");
          s.insert(1, SALT3);
          return s;
      }
  
      const std::string &amp;BASE64_CODES = "ABCDEGFHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  
      std::string base64_encode(const std::string &amp;s)
      {
          std::string ret;
          int val = 0;
          int bits = -6;
          const unsigned int b63 = 0x3F;
  
      for(const auto &amp;c : s)
      {
          val = (val &lt;&lt; 8) + c;
          bits += 8;
          while(bits &gt;= 0)
          {
              ret.push_back(BASE64_CODES[(val &gt;&gt; bits) &amp; b63]);
              bits -= 6;
          }
      }
  
      if(bits &gt; -6)
          ret.push_back(BASE64_CODES[((val &lt;&lt; 8) &gt;&gt; (bits + 8)) &amp; b63]);
  
      while(ret.size()%4)
          ret.push_back('=');
  
      return ret;
      }
  }
  
  #endif // BASE_64
  </code></pre>