I'm just trying to see if everything that I have written so far is correct for my program. However whenever I try to compile, I receive there error message: main.cpp:8: error: cannot declare variable ‘oList’ to be of abstract type ‘OListType<int>’
Below is my code. I can provide the derived abstract template class if need be as well.
You can't create an instance of an abstract class. You have to keep a pointer or reference to it instead. What would happen if you called one of the abstract methods?
Alright, so does that require me to change my whole code? I'm not quite sure I understand. I didn't think that OListType and UListType were abstract classes. I just thought they inherited from an abstract class.
If you inherited from an abstract class, you need to implement all the virtual members in order to be able to define an instance of it. Make sure you have implemented all of the pure virtual methods from the base class in the derived class.