B
brianhray
This works find in Dev Studio and Codewarrior but does not compile
GCC4:
template <class T>
void SerializeVector(RArchive &ar, vector<T>& v)
{
for (vector<T>::iterator i = v.begin(); i != v.end(); i++)
SerializeVar(ar, *i);
}
I get "error: expected `;' before 'i'". Even if I just have
"vector<T>::iterator i ". Why would changing compilers cause this
problem? Am I doing something wrong? How do I fix?
--bhr
GCC4:
template <class T>
void SerializeVector(RArchive &ar, vector<T>& v)
{
for (vector<T>::iterator i = v.begin(); i != v.end(); i++)
SerializeVar(ar, *i);
}
I get "error: expected `;' before 'i'". Even if I just have
"vector<T>::iterator i ". Why would changing compilers cause this
problem? Am I doing something wrong? How do I fix?
--bhr