I am implementing a Red-Black tree in C++, and want to use a templated class for any type of input. This is what I have in the header:
template <class T>
class RBtree{
public:
    RBtree();
    ~RBtree();
    //...
private:
    //...
};
And in the .cpp file:
RBtree::RBtree(){
    //...
}
//...
When I try to compile in Xcode, I get an error of "Expected a class or namespace", but wasn't the constructor already defined in the header? I also get errors for all method implementations in my .cpp file.
Edit: Yochai's answer below is correct.
 
     
     
     
    