Possible Duplicate:
Why do I get “unresolved external symbol” errors when using templates?
I am making a linkedList. I am using an external iterator. The Iterator class is a template, and I am implementing my methods in the Iterator.h.
Here is the template:
#pragma once
#include "Node.h"
namespace list_1
{
template<typename T>
class Iterator
{
public:
Iterator<T> (Node<T> *np);
void operator++();
bool is_item();
T operator* ();
private:
Node<T>* n;
};
template<typename T>
Iterator<T>::Iterator (Node<T> *np)
{
}
template<typename T>
void Iterator<T>::operator++()
{
}
template<typename T>
bool Iterator<T>::is_item()
{
return false;
}
template<typename T>
T Iterator<T>::operator* ()
{
}
}
I get this error message when I try to compile: 1>list_test.obj : error LNK2019: unresolved external symbol "public: void __thiscall list_1::Iterator<double>::operator++(void)"
Plus about seven other similar errors in the whole project.
Am I doing something wrong here? Or is it something else I am doing wrong?
Thanks!