List destructor in C++
I've just implemented the Linked List. It works perfectly fine but even tough I've seen notation I am unable to create working destructor on Node, that's why it's unimplemented here in code. I need to implement working destructor on node Destructor of List but this one is simple I will just use the destructor from Node class(but I need this one). Make the List friendly to Node so I will not have to use getNext(), but I think I can handle it myself(not sure how, but I'll find out). Please look at the code it is perfectly fine, just will work if you copy it. #include <cstdio> #include <cmath>