Monday, November 28, 2016

Digest for comp.lang.c++@googlegroups.com - 1 update in 1 topic

xerofoify <xerofoify@gmail.com>: Nov 28 02:50PM -0800

On Monday, November 28, 2016 at 5:27:09 PM UTC-5, Paavo Helde wrote:
> }
> }
 
> Moreover, if here p->data_==data, this thing goes into infinite loop.
 
I am still confused Paavo. Can you show me through code as it seems like I am not understanding it for some reason. Also does changing begin to this do anything:
iterator begin(){
Node* curr = root_;
if (curr->right_ == nullptr && curr->left_ == nullptr) {
return nullptr;
}
if (curr != nullptr) {
while(curr->left_!=nullptr){
curr = curr->left_;
}
}
return iterator(curr);
}
Look I have tried this for at least a few things now and ran through a debugger many times guys. Something is not clicking in my understanding so asking me to run through it with a debugger does not help.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: