Sep 7, 2013 at 12:18am UTC
Ok now that I've removed Node from it, it works. I swear I'd lose my head if it wasn't attached.
Sep 7, 2013 at 12:36am UTC
Looking at the remove_all(const int& entry) now. The only hint the professor gave was this:
// Cases to look for (provided by Professor)
// head == entry
// head != entry
// middle == entry
// middle != entry
Sep 10, 2013 at 8:58pm UTC
I'm actually doing this same assignment for this class. I have a question on the Is_item function in the Iterator.
1 2 3 4 5 6 7
bool Iterator::is_item()
{
if (n->next != nullptr )
return true ;
return false ;
}
This is what i have which works except it makes the last node in the list not an item. So if I insert 1 , 2 , 3 it prints 3 and then 2 but not the 1 as it is not an item. How would I include the last node and have the iterator stop at the end of the list?
Last edited on Sep 10, 2013 at 8:59pm UTC
Sep 10, 2013 at 9:07pm UTC
Oh i see my mistake check the pointer itself not the next. thanks for the help
Sep 18, 2013 at 10:11pm UTC
I'm under the impression that he gave you this, and it was supposed to be functional...
Seriously, your PROFESSOR wrote this?????
I think you should seriously question his credentials if he is telling you to use this for your projects.