I have defined my own class, Queue, which inherits from my own class, LinkedList. I have been using templates to allow Queues to be of int, string, etc types.
But now I want to be able to store objects in my Queue type. And so the problem I have is that in my LinkedList class, I have two instances where I initialize an instance of my generic type T to 0.
For instance, the removeFirst() method starts like this:
1 2 3
template <typename T>
T LinkedList<T>::removeFirst() {
T a = 0;
And so the compiler complains that it can't convert from int to [in this case] Command&.