I have 2 classes that inherit from a liked list type structure I have written. The 2 classes work mostly the same except for 1 method so I want to inherit the methods from one class into the other instead of re writing them. Here is some of the the code I have however it doesn't work. I have a basicList and complexList.
basicList.hpp
1 2 3 4 5 6 7 8 9 10 11 12 13
#include "List.hpp"
#include "LinkedList.hpp"
class basicList : public list {
public:
basicList();
LinkedList list;
virtual ~basicList();
virtualunsignedint count() const;
};