C++ version of java this. in classes
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6905598/c-equivalent-to-java-this">C++ equivalent to Java this</a>  </p>
</blockquote>



<p>What is the c++ version of java's this. :</p>

<pre><code>class javaObj{

private String name;

public void setName(String name)
{
    this.name = name;
}
}
</code></pre>

<p>Only thing i have found that works in c++ is:</p>

<pre><code>class cppObj
{
private:
    string name;

public:
    void setName(string name);
};

void cppObj::setName(string name)
{
    cppObj::name = name;
}
</code></pre>

<p>must I use cppObj:: or is there a this. equivalent for c++?</p>
