I am having trouble with a compilation error as shown below:
C:\Users........................(35): note: while compiling class template member function 'void cs140::RenderVisitors::visit(cs140::Background &)'
Can anyone help to enlighten me on this? I've been stuck for a while now, searching the internet for sources that resemble this error, but they are all unrelated cases. Thank you. Do note: the code below isn't compilable.
Header file
namespace cs140
{
template <typename T>
class Background
{
};
template<typename T>
class RenderVisitors
{
public:
void visit(Background<T>& background);
private:
};
}
HPP file
namespace cs140
{
template<typename T>
void RenderVisitors<T>::visit(Background<T>& background)
{
}
}