Hey yall, so for one of my projects I've been assigned to do some templated functions for vectors that use iterators. I can do it every other way, and maybe I'm just misunderstanding iterators, but here is what I set up for the function to print a vector. At the moment it is not working because line 4 says it needs typename before, and on line 6 it says iter is not declared in this scope. If anyone has any ideas or just some thought on iterators, I would really appreciate someone else's input!
You just said how to fix it. Put 'typename' before it.
Also, you need to make it const_iterator since the vector reference is const.
Also, begin() is a function, so it needs the parens.
ah ok that makes a lot of sense haha, i guess i was way overthinking it since a lot of the stuff I'm doing right now is a little over my head, but now i think it makes much more sense, thank you for the help DizzyDon!