How do you print the address of an object in C++?
<p>If I have the following basic C++ program:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

class CRectangle {
    int x, y;
  public:
    void set_values (int,int);
    int area () {return (x*y);}
};

void CRectangle::set_values (int a, int b) {
  x = a;
  y = b;
}

int main () {
  CRectangle rect;
  rect.set_values (3,4);
  cout &lt;&lt; "area: " &lt;&lt; rect.area() &lt;&lt;endl;
  cout &lt;&lt;&amp;rect&lt;&lt;endl;
  cin.get();
  return 0;
}
</code></pre>

<p>is the last print statement printing the address of the variable rect or the address of the object? are they the same? or are they the same?</p>
