C++ Custom List template
<p>I am trying to create a custom List template in C++ but haven't gotten very far! I have the skeleton of the coding done and am now trying to fill it in. Basically, I would like it to be possible to create a new list where the two nodes (first, last) will be NULL until values are added into the list.</p>

<p>However, there is a huge error message which seems to be a i/o one. It is too long to paste here. I'm sure I am doing something silly that will be spotted by those more experienced then me.</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

template &lt;class T&gt;
class node {
    T value;
    node&lt;T&gt; *next;
    node&lt;T&gt; *previous;  
};

template &lt;class T&gt;
class my_list {
    public:
         node&lt;T&gt; first;
         node&lt;T&gt; last;
         my_list(){
            first = NULL;
            last = NULL;
         }
        ~my_list(){
         }
         void push_back(T val);
 };

template &lt;class T&gt;
void my_list&lt;T&gt;::push_back(T val){
if (this-&gt;first == NULL) {
    cout &lt;&lt; "Hello";
}
}

int main() {
my_list&lt;int&gt; newlist;
newlist.push_back(5);
}
</code></pre>
