c++ source code organization for free functions
<p>I want to start to prefer free (non-member) functions over member funtions - following this article <a href="http://www.drdobbs.com/184401197" rel="nofollow">http://www.drdobbs.com/184401197</a></p>

<p>I am used to organize my C++ classes in that way, that I have <code>ClassName.h</code> for the declaration and a <code>ClassName.C</code> for the implementation.</p>

<pre><code>ClassName.h :

struct ClassName { 
    ClassName();
    void setData( unsigned data );
};
</code></pre>

<p>and the implementation is then </p>

<pre><code>ClassName.C :

#include "ClassName.h"

ClassName::ClassName() { dosomething(); };
void setData( unsigned data ) { dootherthings(); }; 
</code></pre>

<p>So how do I organize my code when I want have a free function <code>adjustClassData()</code> ?
I also want to put this function into namespace.</p>

<p>Assuming <code>ClassName</code> is in <code>namespace foo</code>, then I would put the free function into <code>namespace foo</code> as well:</p>

<pre><code>namespace foo {
    void adjustClassData( ClassName &amp; inObj );
}
</code></pre>

<p>I am looking for the aspects of <code>namespace</code> and suggestions for file names.</p>

<p>I am looking for some best-practices - as there is no C++ rule in the standard prescribing the file organization.</p>
