Hello I have the following problem.
1. I have the following template class.
template<typename T> class Array
{
};
2. I have another template class that inherits from Array
template<typename T> class OpenGlVertexArray : public Array<T>
{
public:
virtual OpenGlVertexArray<T>* to_2d(void) const=0;
virtual OpenGlVertexArray<T>* to_3d(void) const=0;
// more code.
}
3. The third class inherites from OpenGlVertexArray
template<typename T> class OpenGlVertexArray2D : public OpenGlVertexArray< OpenGlVertex2D<T> >
{
public:
virtual OpenGlVertexArray<T>* to_2d(void) const;
virtual OpenGlVertexArray<T>* to_3d(void) const;
};
after providing the implemintation for both functions I get compiler errors and some times linker errors.
The errors I get are usually
C2555 type.
and some unresolved symbols.
How can I fix this.
1. I have the following template class.
template<typename T> class Array
{
};
2. I have another template class that inherits from Array
template<typename T> class OpenGlVertexArray : public Array<T>
{
public:
virtual OpenGlVertexArray<T>* to_2d(void) const=0;
virtual OpenGlVertexArray<T>* to_3d(void) const=0;
// more code.
}
3. The third class inherites from OpenGlVertexArray
template<typename T> class OpenGlVertexArray2D : public OpenGlVertexArray< OpenGlVertex2D<T> >
{
public:
virtual OpenGlVertexArray<T>* to_2d(void) const;
virtual OpenGlVertexArray<T>* to_3d(void) const;
};
after providing the implemintation for both functions I get compiler errors and some times linker errors.
The errors I get are usually
C2555 type.
and some unresolved symbols.
How can I fix this.