title: Difference between func() and (*this).func() in C++
body: <p>I am working on someone else code in C++, and I found a weird call to a certain function <code>func()</code>. Here is an example:</p>
  
  <pre><code>if(condition)
      func();
  else
      (*this).func();
  </code></pre>
  
  <p>What is the difference between <code>func()</code> and <code>(*this).func()</code>?</p>
  
  <p>What are the cases where the call to <code>func()</code> and <code>(*this).func()</code> will execute different code?</p>
  
  <p>In my case, <code>func()</code> is not a macro. It is a virtual function in the base class, with an implementation in both base and derived class, and no free <code>func()</code>. The <code>if</code> is located in a method in the base class.</p>