Why would you need to return something to the input stream?
<p>The code was utilized to create a functioning calculator program. The whole thing's a bit long so I won't get into into all of it, but here's one portion: </p>

<pre><code>Token Token_stream::get()
{
    if (full) { // do we already have a Token ready?
        full = false; // remove Token from buffer
        return buffer;
    }
    char ch;
    cin &gt;&gt; ch; // note that &gt;&gt; skips whitespace (space, newline, tab, etc.)

    switch (ch) {
        case ';': // for “print”
        case 'q': // for “quit”
        case '(': case ')': case '+': case '–': case '*': case '/':
            return Token{ch}; // let each character represent itself
        case '.':
        case '0': case '1': case '2': case '3': case '4':
        case '5': case '6': case '7': case '8': case '9':
        {   
            cin.putback(ch); // put digit back into the input stream
            double val;
            cin &gt;&gt; val; // read a floating-point number
            return Token{'8',val}; // let ‘8’ represent “a number”
        }
        default:
            error("Bad token");

    }
}
</code></pre>

<p>Why would you need to put ch back into the input stream? Couldn't you just use the ch input instead of utilizing a whole new variable of val? </p>