In my slist.hpp file it gives me the errors on these two functions.
1 2 3 4 5 6 7 8 9 10 11
template<typename generic>
Iterator SList<generic>::begin() const // this line
{
return Iterator(m_front);
}
template<typename generic>
Iterator SList<generic>::end() const // this line
{
return Iterator();
}
The errors are:
slist.hpp:135: error: expected constructor, destructor, or type conversion before âSListâ
slist.hpp:141: error: expected constructor, destructor, or type conversion before âSListâ
I don't understand why it is saying this because I have the
typedef SListIterator<generic> Iterator;
So shouldn't Iterator be the type conversion before SList?
If I didn't give enough information to solve the problem or said something that doesn't make any sense please let me know, I am fairly new to all of this.
Thanks for all the help. :)