Problem with inner class

P

pazabo

Hi, I have a problem with this class (I omitted unimportant parts):

template <class T> class mylist {
public:
class iterator;

iterator getIterator();
// ...
};

template <class T> class mylist<T>::iterator {
// ...
};

template <class T> iterator mylist<T>::getIterator() {
// ...
}

and GCC says:
"error: expected constructor, destructor, or type conversion before
'mylist'"
in line "template <class T> iterator mylist<T>::getIterator() {".

Does anybody know what does that mean??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top