title: Get value from a class member being a pointer
body: <p>Given the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class CRectangle {
  
    public:
      int *width, *height;
      CRectangle (int,int);
      ~CRectangle ();
      int area () {return (*width * *height);}
  };
  
  CRectangle::CRectangle (int a, int b) {
    width = new int;
    height = new int;
    *width = a;
    *height = b;
  }
  
  CRectangle::~CRectangle () {
    delete width;
    delete height;
  }
  
  int main () {
    CRectangle rect (3,4), rectb (5,6);
    cout &lt;&lt; "rect area: " &lt;&lt; rect.area() &lt;&lt; endl;
    cout &lt;&lt; "rectb area: " &lt;&lt; rectb.area() &lt;&lt; endl;
  
    CRectangle * p = new CRectangle(10,10);
  
    cout &lt;&lt; "rect area: " &lt;&lt; p-&gt;*height &lt;&lt; endl;
  
    return 0;
  }
  </code></pre>
  
  <p>how can I get last <code>cout</code> statement to work?</p>