=我有這樣的一個結構 -請幫助我瞭解運算符重載鏈表C++
struct IntNode
{
int data;
IntNode * next;
};
,並在類 -
class NodeSLList {
private:``
IntNode *head, *tail;
//some other functions
}
我有一個對象list1
其中包含鏈表節點很少。我必須從list1
創建另一個鏈表list2
。 如何實現這一目標使用功能 -
NodeSLList & operator=(NodeSLList &list){}
我不能如何已瞭解訪問list2
內部操作者=
功能,我將通過list1
裏面喜歡 -
list2=list1;
我如何訪問list2
??
與this指針的幫助 – NightFurry