I need to make my own iterator class. I'm following guides on the internet and looking at the example set by Josuttis in "The C++ Standard Library." Currently, I'm just playing around trying to get something to work (I'm making an iterator to an array. Talk about desperate.) I would like to use the std::iterator class to help me out. Like this

Code:
template<typename arrType>
class iter : public std::iterator<std::random_access_iterator_tag, arrType>
{
 pointer p;
public:
 explicit iter(const pointer pz) { p = pz; }
};
When I compile this I get all sorts of warnings about pointer being an implicit typename. So, I have to do this:

Code:
template<typename arrType>
class iter : public std::iterator<std::random_access_iterator_tag, arrType>
{
 typename std::iterator<std::random_access_iterator_tag, arrType>::pointer p;
public:
 explicit iter(const typename std::iterator<std::random_access_iterator_tag, arrType>::pointer pz) { p = pz; }
};
This looks terrible and it's only going to get worse with more functions! Is there an easier way to get rid of this warning? Thanks.