title: Can a C++ Class Constructor Know Its Instance Name?
body: <p>Is it possible to know the object instance name / variable name from within a class method? For example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class Foo {
       public:
            void Print();
  };
  
  void Foo::Print() {
       // what should be ????????? below ?
       // cout &lt;&lt; "Instance name = " &lt;&lt; ?????????;
  }
  
  int main() {
      Foo a, b;
      a.Print();
      b.Print();
      return 0;
  }
  </code></pre>