return copy of an instance of a class, not a pointer in c++
<p>First; am I mistaken to assume that the <code>this</code> keyword is a <strong>pointer</strong> to the instance of the object I am working with, not a copy?</p>

<p>So if I had:</p>

<pre><code>class someClass {
private:
    int _number;
public:
    someClass method(int number) {
        _number = number;
        return this;
    }
};
</code></pre>

<p>I would be returning a pointer to that instance?</p>

<p>If that is the case, how can I return a copy of that instance? I found a way but I think it's extremely awkward.</p>

<pre><code>class someClass {
private:
    int _number;
public:
    someClass method(int number) {
        _number = number;
        someClass someClassObj;
        someClassObj._number = number;
        return someClassObj;
    }
};
</code></pre>
