title: Why do you use -> to access struct member variables even if you haven't explicitly defined the struct as a pointer?
body: <p>I have a struct that I never explicitly defined as a pointer. But when I try to access its member variables with a <code>.</code> instead of <code>-&gt;</code>, I get an error, and <code>-&gt;</code> seems to be the only correct option.</p>
  <p>As far as I understand, you only use <code>-&gt;</code> to dereference a pointer to a class and access its members. In the code below, <code>Employee</code> is not a pointer, but if I use <code>.</code>, I get an error. Why is that so?</p>
  <pre><code>struct Employee {
    public:
      int getAge(){ return this.age; }
      void setAge(int age){ this.age = age; }
    private:
      int age{18};
  };
  
  int main() {
    Employee emp;
    emp.setAge(55);
    std::cout &lt;&lt; emp.getAge() &lt;&lt; '\n';
  }
  </code></pre>