In the Node framework, I donβt know why I should use Node * forward and not Node<T> * forward . The same question applies to Node * backward . At first I thought it was because you never need to look forward / back inside your nodes ... they are just direct node pointers, and they donβt care what is there. But then I found that I got to nodes with calls like T temp = last->backward->data , and everything worked fine. Therefore, my theory comes out of the window.
template <typename T> struct Node { public: T data; Node<T> * forward { nullptr };
Any comments or suggestions on how I can better understand this would be greatly appreciated. Thanks.
source share