title: C++: Should I use 'typedef' or 'using namespace'?
body: <p>I am writing a library with mutiple dependent modules. When I include a file from a different module, should I resolve the namespace with:</p>
  
  <pre><code>using namespace project1::namespace1;
  class1 obj;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>typedef project1::namespace1::class1 class1;
  class1 obj;
  </code></pre>
  
  <p>What are the pros/cons of each approach? I read somewhere that we should use <code>typedef</code> in .H files and <code>using</code> in .C files, is this advisable?</p>
  
  <p>One problem I have encountered with 'typedef' is it leads to namespace ambiguity if I include both original class and the class with 'typedef' in a third module.</p>