title: Difference between -> and . in C++
body: <p>I'm new to C++, I want to understand why I can't use the dot (.) operator here, since the variable is declared inside the class.</p>
  <pre><code>class SessionController {
      private: SessionView view;
      private: Session model;
      public: SessionController (SessionView view, Session model) {
          this.view = view;
          this-&gt;model = model;
      }
  };
  </code></pre>
  <p>I'm getting an error at <code>this.view = view;</code> saying
  <code>Member reference type 'SessionController *' is a pointer; did you mean to use '-&gt;'?</code></p>