I have a problem with this struct contructor when I try to compile this code:
typedef struct Node { Node( int data ) // { this->data = dat
Don't use NULL, C++ allows you to use the unadorned 0 instead:
NULL
0
previous = 0; next = 0;
And, as at C++11, you generally shouldn't be using either NULL or 0 since it provides you with nullptr of type std::nullptr_t, which is better suited to the task.
nullptr
std::nullptr_t