title: Difference between pointer and smart pointer
body: <p>Can you tell me what is wrong with this piece of code? I got asked this in an interview and I am not sure what's wrong with it </p>
  
  <p>tClass is a test class with a method printSomething that prints members of tClass. </p>
  
  <pre><code>tClass * A = new tClass();
  f(A);
  A-&gt;printSomething();
  
  auto_ptr&lt;tClass&gt; * B = new tClass();
  f(B);
  B-&gt; printSomething();
  </code></pre>
  
  <p>or what this is a trick question.</p>