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

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top