//main
namespace MushBase{
template <class T>
class MushNode{
public:
short type;
T data;
MushNode* prev;
MushNode* next;
//
MushNode(T dat);
};
template <class T>
MushNode<T>::MushNode(T dat){
data = dat;
}
}
int main(){
MushBase::MushNode<int> var(6);
}
this one is blowing my mind, the second version is copy past from the first, but it works and the other doesnt, only difference is that its in different files, i must be missing something but i cant find what it is...
here are the errors :
obj\Debug\main.o||In function `main':|
C:\Users\Mushroom\Documents\iunno\memoryBase\main.cpp|4|undefined reference to `MushBase::MushNode<int>::MushNode(int)'|
||=== Build finished: 1 errors, 0 warnings ===|