Can i inherit the operator>>?
<p>I have the following problem: let's say class <code>Item</code> holds the serial number of a product,
and class <code>Book</code> is an <code>Item</code> which inherits class <code>Item</code>'s serial number. I have to create and use <code>operator&gt;&gt;</code> for every class. I thought about creating <code>operator&gt;&gt;</code> to <code>Item</code>, and then just call it in the implementation of the <code>istream</code> of the book, but I don't know how.</p>

<p>The code goes like this:</p>

<pre><code>class Item
{
protected:
    int _sn;
public:
    Item();
    ~Item();
    ...
    const istream&amp; operator&gt;&gt;(const istream&amp; in,const Item&amp; x)
        {
        int temp;
        in&gt;&gt;temp;
        x._sn=temp;
        return in;
        }
};

class Book
{
private:
    char _book_name[20];
public:
    Book();
    ~Book();
    ...
    const istream&amp; operator&gt;&gt;(const istream&amp; in,const Book&amp; x)
        {
        char temp[20];
        ////**here i want to use the operator&gt;&gt; of Item**////
        in&gt;&gt;temp;
        strcpy(x._book_name,temp);
        return in;
        }
};

int main()
{
Book book;
in&gt;&gt;book; //here i want to get both _sn and _book_name
}
</code></pre>

<p>Is this even possible?</p>
