X
Xin Wang
Hi,
I tried to declare an iterator inside a template class, but the compiler
regards list<State>::iterator as an expression, instead of an iterator.
#include <list>
template <class State>
class Problem
{
..
..
..
list<State>::iterator itr;
..
..
..
}
What's wrong here, what should I do to fix this problem?
Thanks a lot!
Xin Wang
I tried to declare an iterator inside a template class, but the compiler
regards list<State>::iterator as an expression, instead of an iterator.
#include <list>
template <class State>
class Problem
{
..
..
..
list<State>::iterator itr;
..
..
..
}
What's wrong here, what should I do to fix this problem?
Thanks a lot!
Xin Wang