# HG changeset patch # User Eris Caffee # Date 1432950367 18000 # Node ID 3db1a894bbdf8e9488c4bbfd10018c8d1e531a58 # Parent 310618f5e32a9bfe777ac4bd0642a2249c65d02b Fixed bug in iterator's operator!= diff -r 310618f5e32a -r 3db1a894bbdf algs4-c++/src/ResizingArrayStack.cpp --- a/algs4-c++/src/ResizingArrayStack.cpp Thu May 28 23:53:46 2015 -0500 +++ b/algs4-c++/src/ResizingArrayStack.cpp Fri May 29 20:46:07 2015 -0500 @@ -106,8 +106,8 @@ } template -bool ResizingArrayStack::iterator::operator!=( typename ResizingArrayStack::iterator ) { - return this->curr != this->end; +bool ResizingArrayStack::iterator::operator!=( typename ResizingArrayStack::iterator other ) { + return this->curr != other.curr; }