title: How it is correct to specify declaration for my namespace and the function in the second case?
body: <p>Look, I placed my namespace and the function before the <code>main</code> and this compiled successfully:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;exception&gt;
  #include &lt;string&gt;
  using namespace std;
  //==================================================
  namespace Bushman{
      void to_lower(char* s)
      // Replace all chars to lower case.
      {
          const int delta = 'a' - 'A';                
          while(*s){
              if(*s &gt;= 'a' &amp;&amp; *s &lt;= 'z') *s -= delta;         
              ++s;
          }
      }
  }
  //==================================================
  int main()
  // entry point
  try{
      namespace B = Bushman; // namespace alias
      void B::to_lower(char* s);  
      char* str = "HELLO, WORLD!";
      B::to_lower(str);   
      printf("%s\n",str);
  }
  catch(exception&amp; e){
      cerr &lt;&lt; e.what() &lt;&lt; endl;
      return 1;
  }
  catch(...){
      cerr &lt;&lt; "Unknown exception." &lt;&lt; endl;
      return 2;
  }
  </code></pre>
  
  <p>But if I placed my namespace and the function after the <code>main</code>, then I can't compile this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;exception&gt;
  #include &lt;string&gt;
  using namespace std;
  //==================================================
  int main()
  // entry point
  try{
      namespace B = Bushman; // namespace alias
      void B::to_lower(char* s);  
      char* str = "HELLO, WORLD!";
      B::to_lower(str);   
      printf("%s\n",str);
  }
  catch(exception&amp; e){
      cerr &lt;&lt; e.what() &lt;&lt; endl;
      return 1;
  }
  catch(...){
      cerr &lt;&lt; "Unknown exception." &lt;&lt; endl;
      return 2;
  }
  //==================================================
  namespace Bushman{
      void to_lower(char* s)
      // Replace all chars to lower case.
      {
          const int delta = 'a' - 'A';                
          while(*s){
              if(*s &gt;= 'a' &amp;&amp; *s &lt;= 'z') *s -= delta;         
              ++s;
          }
      }
  }
  </code></pre>
  
  <p>How it is correct to specify declaration for my namespace and the function in the second case?</p>