implementing prefix operator++
<p>From <a href="http://www.learncpp.com/cpp-tutorial/97-overloading-the-increment-and-decrement-operators/" rel="nofollow">http://www.learncpp.com/cpp-tutorial/97-overloading-the-increment-and-decrement-operators/</a></p>

<p>Class declaration</p>

<pre><code>class Digit
{
private:
    int m_nDigit;
public:
    Digit(int nDigit=0)
    {
        m_nDigit = nDigit;
    }

    Digit&amp; operator++();
    Digit&amp; operator--();

    int GetDigit() const { return m_nDigit; }
};
</code></pre>

<p>Their implementation of <code>operator++</code></p>

<pre><code>Digit&amp; Digit::operator++()
{
    // If our number is already at 9, wrap around to 0
    if (m_nDigit == 9)
        m_nDigit = 0;
    // otherwise just increment to next number
    else
        ++m_nDigit;

    return *this;
}
</code></pre>

<p>My alternate implementation of <code>operator++</code></p>

<pre><code>Digit&amp; Digit::operator++()
{
    return Digit(m_nDigit == 9 ? 0 : (m_nDigit + 1));
}
</code></pre>

<p>I wanted to know</p>

<ol>
<li>if there are any downsides of creating a new object like I have done, and</li>
<li>about how to choose one of these implementations?</li>
</ol>
