I'm studying data structures (List, Stack, Queue), and this part of code is confusing me.
ListNode( const Object& theElement = Object(), ListNode * node = NULL);
template<class Object>
ListNode<Object>::ListNode( const Object& theElement, ListNode<Object> * node) {
element = theElement;
next = node;
}
- Why there are assignment operators within function parameters?
- What does
Object()
call do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…