This question already has an answer here:
I am confused as to how to implement the doThis function in the following code:
template<typename Elem> class TemplateClass{
public:
class NestedClass{
//parameters};
public:
NestedClass doThis();
};
When compiling with the following implementation, "error: expected constructor, destructor, or type conversion before TemplateClass" is shown.
The member function implementation I used is:
template<typename Elem> TemplateClass<Elem>::NestedClass TemplateClass<Elem>::doThis(){
//do stuff...
}
Aucun commentaire:
Enregistrer un commentaire