Create a templated linked list of an abstract class

I am trying to implement a linked list of a base class that would be filled with objects from the two derived classes. The base class itself is an abstract class.

In the cpp file I have:
 
  m_vehicles = new LinkedList<Vehicles*>;


In the h file I have:
 
  LinkedList<Vehicles>* m_vehicles;


What is the correct syntax to implement this code? I know that the way they are written does not match. The errors I am getting say both that the two do not match and that Vehicles is an invalid abstract parameter type.
Put the types side by side:
1
2
m_vehicles = new LinkedList<Vehicles*>;
                 LinkedList<Vehicles >  *m_vehicles;
What's missing?
I am trying to implement a linked list of a base class that would be filled with objects from the two derived classes.

So a common representation of the 2 derived classes would be through pointers to the base class i.e. LinkedList<Vehicle*> m_vehicles;
tIM has already made this point to you earlier today:
http://www.cplusplus.com/forum/beginner/209045/#msg983866
Rather than spray and pray * throughout your code I suggest you get back to basics and take a moment to review the fundmentals first
Topic archived. No new replies allowed.