I just created a template class
template< typename T >
class LinkedList {
private:
struct LinkedListElement {
T *m_data;
LinkedListElement *m_next;
};
LinkedListElement *head;
public:
void insert(T *elem);
void remove(T *elem);
T *find(const char *name);
};
and I want to set up a method findfor a specific class.
So, when I do my specialization on a template, do I need to rewrite the code for the implementation of the hole template or just t * find (for example, with a subclass)?
This is the first time I create my own template;)
Help will be appreciated.
source
share