I have found some topics on templates and methods. But I can’t figure out how it applies in my scenario.
template <class T>
class SimpleLinkedList {}
Let’s assume this is my template classe and it contains the method:
LinkedNode<T> * next(){};
Where LinkedNode is also a Template and uses the class T from SimpleLinkedList template.
The error that is thrown is :
Member reference base type "LinkedNode<T>" is not a struct or union.
Now I know what a struct or union is, but I can’t figure out why my method is wrong.
edit
Error seemed to be something completely different.
NVM.
Thanks Demi.
Probably you defined
LinkedNodenot as template inSimpleLinkedList. You may try to remove<T>inLinkedNode<T> * next(){}. Is this works? More information needed.