We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It depends on the C++ implementation. Referencing deallocated memory results in "undefined behavior". To be safe, I believe a temporary variable is needed here.
Delete duplicate-value nodes from a sorted linked list
You are viewing a single comment's thread. Return to all comments →
It depends on the C++ implementation. Referencing deallocated memory results in "undefined behavior". To be safe, I believe a temporary variable is needed here.