template <class T>
class List
{
public:
List();
~List();
...
protected:
template <class T> struct Item
{
struct Item* next;
T data;
};
...
struct Item<T>* allocate();
};
template <class T>
struct Item<T>* List<T>::allocate() // error here
{
...
return object; // struct Item<T>*
}
내가 어떻게 할 수 있습니까?C++ 템플릿 클래스 T 문제
어떤 오류가 발생합니까? – FrustratedWithFormsDesigner
내부 'Item'을 자체적으로 템플릿으로 만들 것인지 여부를 결정 했습니까? – AnT
구문 오류입니다. 이제 작동합니다. thx to Matthieu M. – ohohoho