title: Vector of templated class?
body: <p>I'm having a problem with a little part of code, I'm trying to work with templates and a vector of a template class<br>
  A friend helped me with the following code, getting it to a state where it compilles, but I still can't use derived classes well enough, so I'm completely lost and I can't get past this little error, I could really use your help</p>
  
  <pre><code>   #include &lt;iostream&gt;
     #include &lt;vector&gt;
  
     class data_base
     {
     public:
           data_base( std::string &amp;_id );
  
           std::string id;
     };
  
     template &lt;typename T&gt;
     class data : public data_base
     {
     public:
           data&lt;T&gt;( T &amp;_data, std::string &amp;_id );
  
           T *data;
     };
  
     data_base::data_base( std::string &amp;_id )
     {
           id = _id;
     }
  
     template &lt;typename T&gt;
     data&lt;T&gt;::data( T &amp;_data, std::string &amp;_id )
     {
          data =&amp; _data;
          id = _id;
     }
  
  
     int main()
     {
         std::vector&lt; data_base*&gt; stuff;
  
         return 0;
    }
  </code></pre>
  
  <p>How would one go around using the data class and putting it in stuff vector, and accessing it later?<br>
  Oh, and if anyone would know a good tutorial about using base/derived classes, I could really use that<br>
  Thanks in advance</p>