title: The 'this' pointer in the initialization list of the constructor
body: <p>I guess I am unable to understand why this is not working. I always thought that I can use '<code>this</code>' pointer inside the constructor, but I never knew that I cannot use '<code>this</code>' in the initialization list.</p>
  <pre><code>#include &lt;iostream&gt;
  
  class A {
      public:
          int a;
          int b;
          A(int a = 0, int b = 0) : this-&gt;a(a), this-&gt;b(b) { }
          void print() {
          std::cout &lt;&lt; a &lt;&lt; &quot;, &quot; &lt;&lt; b &lt;&lt; std::endl;
      }
  };
  
  int main() {
      A a;
      a.print();
  }
  </code></pre>
  <p>I am interested to know the details related to it.</p>