Is there a way to define functions declared in a namespace in a separate .h and .cpp file?
<p>I am still kind of new to many areas of c++ and one is general .cpp and .h file organization. </p>

<p>I am creating a namespace with some structs and functions. I would like to declare the namespace in a .h file similar to this</p>

<pre><code>//objectname.h
namespace ObjectName
{
   Object Function(arguments);
}
</code></pre>

<p>declarations in function.h </p>

<pre><code>//function.h
//includes declarations used in the function definition as well
//as possibly a redundant function declaration.
Object Function(arguments);
</code></pre>

<p>then the definition in function.cpp</p>

<pre><code>//function.cpp
#include "Function.h"
Object Function(arguments)
{
  ....
}
</code></pre>

<p>So that you can see abstractly the namespace in <code>objectname.h</code>, function particular declarations in <code>function.h</code> and function definition in <code>function.cpp.</code> As always any suggestions are greatly appreciated. (also windows based c++)</p>