Is there any reason to use this->
<p>I programmed in C++ for many years and I still have doubt about one thing. In many places in other people code I see something like:</p>

<pre><code>void Classx::memberfunction()
{
    this-&gt;doSomething();
}
</code></pre>

<p>If I need to import/use that code, I simply remove the <strong>this-></strong> part, and I have never seen anything broken or having some side-effects.</p>

<pre><code>void Classx::memberfunction()
{
    doSomething();
}
</code></pre>

<p>So, do you know of any reason to use such construct?</p>

<p>EDIT: Please note that I'm talking about member functions here, not variables. I understand it can be used when you want to make a distinction between a member variable and function parameter.</p>

<p>EDIT: apparent duplicate:
<a href="http://stackoverflow.com/questions/333291/are-there-any-reasons-not-to-use-this-self-me">http://stackoverflow.com/questions/333291/are-there-any-reasons-not-to-use-this-self-me</a></p>
