title: What does '&' means on heap allocated pointers?
body: <p>I'm studying about accessing private class members. I would like to understand better about this.</p>
  
  <pre><code>class Sharp 
  {
  public:
      Sharp();
      ~Sharp();
  private:
      DWORD dwSharp;
  public:
      void SetSharp( DWORD sharp ) { dwSharp = sharp; };
  };
  
  Sharp::Sharp()
  {
      dwSharp = 5;
  }
  Sharp::~Sharp()
  {
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      DWORD a = 1;
      *(DWORD*)&amp;a = 3;
  
      Sharp *pSharp = new Sharp;
      cout &lt;&lt; *(DWORD*)&amp;pSharp[0] &lt;&lt; endl;
  
      cout &lt;&lt; *(DWORD*)pSharp &lt;&lt; endl;
      cout &lt;&lt; (DWORD*&amp;)pSharp[0] &lt;&lt; endl;
  
      //pSharp = points to first object on class
      //&amp;pSharp = address where pointer is stored
      //&amp;pSharp[0] = same as pSharp
      //I Would like you to correct me on these statements, thanks!
  
  
      delete pSharp;
      system("PAUSE");
      return 0;
  }
  </code></pre>
  
  <p>So my question is, what is <code>pSharp</code>,<code>&amp;pSharp</code> and <code>&amp;pSharp[0]</code>, also please explain <code>cout &lt;&lt; (DWORD*&amp;)pSharp[0] &lt;&lt; endl;</code> and why it outputs <code>0000005</code>.</p>
  
  <p>Thank you!</p>