First of all, the function implementation of a template class must be "visible" to any code that uses it.
So you should implement the template class in the header file.
Second, the right syntax is:
template <class T>
RBtree<T>::RBtree(){
//...
}
//...