Someone correct me if I'm wrong, but I believe you'll need to instantiate your static variable for the types you are going to instantiate your template class to. The problem here is that you are generated an 'unsigned char' version of this class, but it has this static unsigned char 'num' that the linker can't find an instantiation for.
template<typename T>
class Random
{
private:
static T num;
public:
staticconst T getnumc()
{
return (const T) num;
}
static T getnum()
{
return num;
}
Random( T min, T max )
{
num = ( ( rand() / ( RAND_MAX + 1 ) ) * ( max - min ) ) + min;
}
};
//static member(s) should have a definition outside the class
//a generic definition
template<typename T>
T Random<T>::num;
//An example specialisation for floats
template<>
float Random<float>::num = 3.7f;