I have a template class, LinkedList, that I want to develop an iterator for. I have defined the iterator class in the private declarations area of the linked list.
But my compiler (in VS 2012) won't accept my declaration/definition of the LinkedList method getIterator(), that is supposed to return an Iterator object. It says definition does not match declaration (but to me it looks like it does). Furthermore, the compiler reacts in all sorts of ways on the line in my code that declares the getIterator() function, saying "missing ';' before identifier 'getIterator'", LinkedList<T>::Iterator<T>::{ctor} is not a memmber of a base class of LinkedList<T>" and "Iterator<int>: access declaration can only be applied to a base class member".