Whoops, totally missed that it was doubly-linked. Must have been thinking of a different thread.
Because it's probably the simplest task where where you cannot possibly get it done without a proper understanding of pointers. And it properly demonstrates the usefulness of pointers AND dynamic memory allocation, unlike examples where the pointer points to a local variable.In my opinion, the exercise of building a linked-list is the best exercise for learning the combination or raw-pointers and manual memory management. Why?
One could say the same thing about having to learn smart pointers in addition to list building. But point taken.I'm honestly asking; why start with the extra complexity?
It seems you took my usage of "can't" too literally, or I used the word when I shouldn't have.You said "can't". You said that is simply could not be done.
Well this has certainly very much changed my perspective somewhat. It hasn't changed my opinion, but I can certainly see the other perspective very clearly.