//arrayList.h
template<class T>
class arrayList{
public:
// constructor, copy constructor and destructor
arrayList(int initialCapacity = 10);
arrayList(const arrayList<T>&);
~arrayList();
// iterators to start and end of list
class iterator;
class seamlessPointer;
seamlessPointer begin();
seamlessPointer end() ;
protected:
T* position;
}; // end of iterator class
protected:
T* element;
int arrayLength;
int listSize;
};
//main.cpp
int main() {
는 ...........중첩 된 반복자 오류
sort(dict.begin, dict.end(),compare_nocase); ////
return 0;
}
두 오류는 다음과 같습니다
..\src\test.cpp: In function 'int main()':
..\src\test.cpp:50:44: error: no matching function for call to 'sort(<unresolved overloaded function type>, arrayList<std::basic_string<char> >::seamlessPointer, bool (&)(std::string, std::string))'
..\src\/arrayList.h: In member function 'arrayList<T>::seamlessPointer arrayList<T>::end() [with T = std::basic_string<char>]':
..\src\test.cpp:50:28: instantiated from here
..\src\/arrayList.h:114:3: error: 'arrayList<T>::seamlessPointer::seamlessPointer(T*) [with T = std::basic_string<char>]' is private
..\src\/arrayList.h:49:44: error: within this context
가 왜 이러한 오류를받을 수 있나요? 문제가 해결
EDIT. 감사합니다
해결했습니다. 그러나 더 많은 오류가 있습니다. – Sean
가장 오류가 관련된 '의 ArrayList :: seamlessPointer 및 ArrayList를 :: seamlessPointer :: 연산자 + (INT)과 T = 표준 : 를 basic_string, ArrayList를 seamlessPointer :: = ArrayList를 <표준 : 를 basic_string> :: seamlessPointer] '이 (가) –
Sean
@ Sean- 다른 수정 프로그램으로 업데이트되었습니다. 이것을 확인할 수 있습니까? – templatetypedef