I try to implement a skiplist and run into this error
undefined reference to `SkipNode::SkipNode(std::string*, int)
Did I use templates incorrectly? Or do is this perhaps a linking problem?
Here is the really simple code (a scaled-down version):
Main.cpp
#include <iostream>
#include <string>
#include "SkipNode.h"
#include "RandomHeight.h"
using namespace std;
int main()
{
    RandomHeight rh(32, 0.5);
    string s = "Test";
    SkipNode<string> skipNode_obj(&s, rh.newLevel()); //ERROR
    for ( int i = 0; i < 10; i++ ) {
        cout << rh.newLevel() << endl;
    }
    cout << "Hello world!" << endl;
    return 0;
}
SkipNode.h
#ifndef SKIPNODE_H
#define SKIPNODE_H
template<typename T>
class SkipNode
{
    public:
        SkipNode(T* value, int h);
        int getHeight();
        T* getValue();
        virtual ~SkipNode();
        SkipNode** fwdNodes;
    private:
        T* value;
        int height;
};
#endif // SKIPNODE_H
SkipNode.cpp
#include "SkipNode.h"
#include <iostream>
using namespace std;
template<typename T>
SkipNode<T>::SkipNode(T* value, int h):value(value), height(h)
{
    fwdNodes = new SkipNode<T>* [h];
    for(int i=0; i<h; i++){
        fwdNodes[i] = nullptr;
    }
}
template<typename T>
int SkipNode<T>::getHeight()
{
    return height;
}
template<typename T>
T* SkipNode<T>::getValue()
{
    return value;
}
template<typename T>
SkipNode<T>::~SkipNode()
{
    cout<<endl;
}
 
     
     
    