title: Access violation reading location in class
body: <p>I am quite new to C++ and I have been playing around with
  pointers and classes a bit. I have run into a problem that so far
  I haven't been able to find a solution to:</p>
  
  <blockquote>
    <p>Unhandled exception at 0x77F87508 (msvcr110d.dll) in RAII.exe: 0xC0000005: Access violation reading location 0xCCCCCCC0.</p>
  </blockquote>
  
  <p>It seems to have something to do with me accessing a pointer
  that I don't have access to.</p>
  
  <p>Main.cpp:</p>
  
  <pre><code>#include &lt;memory&gt;
  #include &lt;iostream&gt;
  #include "Example.hpp"
  
  void example()
  {
      Example e;
  }
  
  int main()
  {
      example();
      std::cout &lt;&lt; "Press any key to exit";
      std::cin.get();
      return 0;
  }
  </code></pre>
  
  <p>Example.cpp:</p>
  
  <pre><code>#include "Example.hpp"
  
  Example::Example()
  {
      m_a = new int(1);
      m_b = new int(2);
      m_b = new int(3);
  }
  
  Example::~Example()
  {
      delete m_a;
      delete m_b;
      delete m_c;
  }
  </code></pre>
  
  <p>Example.hpp:</p>
  
  <pre><code>#ifndef _EXAMPLE_HPP_
  #define _EXAMPLE_HPP_
  
  #include &lt;memory&gt;
  #include &lt;iostream&gt;
  
  class Example
  {
  private:
      int *m_a;
      int *m_b;
      int *m_c;
  public:
      Example();
      ~Example();
  };
  
  #endif _EXAMPLE_HPP_
  </code></pre>
  
  <p>So, what I basically do is allocate memory in the 
  constructor and deallocate it in the destructor.</p>
  
  <p>Any help is welcome! Thanks in advance :D</p>