Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: 「template」および「typename」キーワードをどこに、なぜ配置する必要があるのですか?
私は書いた:
template<class T> typename list<T>::iterator partition(list<T> &, list<T>::iterator, list<T>::iterator);
しかし、私のコンパイラはエラーを見つけました:
エラー: 'std::list::iterator' は型ではありません
この関数の何が問題になっていますか?
試す:
template<class T> typename list<T>::iterator partition(list<T> &, typename list<T>::iterator, typename list<T>::iterator); ^^^^^^^^ ^^^^^^^^