[求助]怎么重载这个加号运算符
以下是两个类的声明,我的问题在红色处,会的帮忙一下,^_^ ^_^
class List;
class Item
{
private:
Item(int d = 0)
{
data = d; next = 0;
}
Item * next;
int data;
public:
friend class List;
};
class List
{
private:
Item *end();
Item *list;
public:
List()
{ list = 0; }
List(int d)
{ list = new Item(d); }
List(Itme *li,Item *en)
{ list =li; end() = en; }
List operator +(const List &list);
};
inline List::operator +(const List &list)
{接下来该如何定义这个函数体
}