아래의 템플릿 클래스를 오버로드하는 방법은 무엇입니까? 다음과 같은템플릿 클래스 및 연산자 오버로드
template <class T>
const_iterator& List<T>::const_iterator::operator++()
{
current = current->next;
return *this;
}
template <class T>
const_iterator List<T>::const_iterator::operator++(int)
{
const_iterator old = *this;
++(*this);
return old;
}
나는 점점 오전 오류 : 리턴 유형이 지정된시
List.cpp:17: error: expected constructor, destructor, or type conversion before ‘&’ token
List.cpp:23: error: expected constructor, destructor, or type conversion before ‘List’
List.cpp:30: error: expected constructor, destructor, or type conversion before ‘&’ token
List.cpp:35: error: expected constructor, destructor, or type conversion before ‘List’
'유형 이름 목록 :: const_iterator를 & 목록 :: const_iterator를 :: 연산자 ++()' –