Original Post
Ok, I've got the following code The compiler gives error for 3, saying "std::vector::iterator : dependent name is not a type". If I comment out 3, it runs properly. What puzzels me is that wht 1 and 2 work, but 3 doesn't. Aren't 1 and 3 basically the same??
template<typename T>
class Test
{
public:
void Foo()
{
typedef std::vector<T>::iterator vec_itor; // 1
}
typedef std::vector<T> vec_type; // 2
typedef std::vector<T>::iterator vec_itor; // 3!!(Problem)
};