title: Access violation reading location 0x00000000. 'new' keyword?
body: <p>I have two classes, A and Bar, both share a header file that has essentially Foo* foo in it. Class A instantiates an object Bar* bar. This works fine. However, if I make the instantiation of the object </p>
  
  <pre><code>Bar* bar = new Bar();
  </code></pre>
  
  <p>I get an access violation when bar attempts to do something with foo. Why does this make a difference? </p>
  
  <p>If I don't use 'new' it works fine. This is the error:</p>
  
  <pre><code>Unhandled exception at 0x003c17ea in Direct3DTutorial7.exe: 0xC0000005: Access violation reading  
  location 0x00000000.
  </code></pre>
  
  <p>Thanks.</p>