Question: The correct implementation for a post-decrement operator for a doubly linked list iterator is (done as an inline function) node_iterator operator --0 { node_iterator original(*this):

 The correct implementation for a post-decrement operator for a doubly linked

The correct implementation for a post-decrement operator for a doubly linked list iterator is (done as an inline function) node_iterator operator --0 { node_iterator original(*this): current = current rightarrow previous(): return original: } node_iterator operator --(int) { node_iterator original(*this): current = current rightarrow previous(): return original: } node_iterator operator --(int) { node_iterator original = current: current = current rightarrow next0: return original: } node_iterator operator --(int) { current = current rightarrow previous(): return *this: }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!