title: In a C++ class, what's the difference between accessing a member variable with "this"
body: <p>I made a simple class to represent a door. To return the variables, I'm accessing them with the <code>this</code> pointer. With respect to just accessing variables, what's the difference between accessing them with the <code>this</code> pointer and without?</p>
  
  <pre><code>class Door
  {
  protected:
      bool shut; // true if shut, false if not shut
  public:
      Door(); // Constructs a shut door.
      bool isOpen(); // Is the door open?
      void Open(); // Opens the door, if possible. By default it
      // is always possible to open a generic door.
      void Close(); // Shuts the door.
  };
  Door::Door()
  {}
  bool Door::isOpen()
  {
      return this-&gt;shut;
  }
  void Door::Open()
  {
      this-&gt;shut = false;
  }
  void Door::Close()
  {
      if(this-&gt;isOpen()) this-&gt;shut = true;
  }
  </code></pre>
  
  <p>There may or may not be a difference here, but what about for more complex classes?</p>