Question: So based on other examples I've found, I'm led to believe that this would be the proper code to iterate over m\_vect:

```
for(vector<T>::iterator it = m_vect.begin(); it != m_vect.end(); ++it)

```

However, upon attempting to compile, I get the following error on that line:

```
heap.h:167:6: error: need ‘typename’ before ‘std::vector<T>::iterator’ because ‘std::vector<T>’ is a dependent scope

```

Like I said, I copied and adapted the line from another piece of code, so I'm really not sure what I'm doing right and wrong. Any insight?

To clarify, this is in a template function, and I have declared 'template '. m\_vect is of type vector. Aaaand I don't know how to display less than and greater than properly...

Answer: 
This appears to be in a template function, and `vector<T>::iterator` is a type which is dependent on `T`, which is a template parameter. Since templates can be specialized with unique definitions for any different type, the compiler has no way of being sure, until the template is actually instantiated, whether `vector<T>::iterator` is a type, or a static member. If it is a static member, this does not make any sense, syntactically:

```
for(vector<T>::iterator it = m_vect.begin(); it != m_vect.end(); ++it)

```

What you need to do is tell the compliler that `vector<T>::iterator` is a type. Use `typename` for that:

```
for(typename vector<T>::iterator it = m_vect.begin(); it != m_vect.end(); ++it)

```

If you read your error, you can see that this is exactly what your compiler is telling you.
If you have amodern enough compiler, you can replace `vector<T>::iterator` with `auto`.

Else, find the correct type to replace the `T` with for your vector.