0

我该如何解决error: type/value mismatch at argument 1 in template parameter list for 'template<class _Tp, class _Alloc> class std::list'

我的课程:

TrieNode.h:

    template <class T>
    class TrieNode {    
       public:
           char subStr;
           list<TrieNode> childs;
           TrieNode<T> parent;

StrTrieNode.h:

    template<class T>
        class StrTrieNode: public TrieNode<T> {
        public:
            list<StrCy> vars;   
        };

StrTrie.cpp:

    template<class StrCy>
    bool StrTrie<StrCy>::searchVars(const char* word) {
           ....
           std::list<StrTrieNode>:: iterator it;         // error!!!
           ....
    }
4

1 回答 1

0

尝试

std::list<StrTrieNode<StrCy>  >:: iterator it; 
于 2013-07-09T01:52:53.773 回答