I'm probably going to embarrass myself by asking this, as I'm expecting a complete oversight of something on my part, but I honestly can't see my error here.
The following code
Code:
template<class T>
bool Sequence<T>::isLinear(std::vector<T> v)
{
std::vector<T>::iterator i; //compiles fine without this line
}
generates the following error
Code:
sequence.cpp: In static member function ‘static bool Sequence<T>::isLinear(std::vector<T, std::allocator<_CharT> >)’:
sequence.cpp:19: error: expected `;' before ‘i’
I've only included the code in the function which gives the error, it compiles fine if I remove the declaration of the iterator.
So what have I missed?