the following code says
error: expected ‘;’ before ‘forwit’
error: expected ‘;’ before ‘revit’
template<class T>
class mapping {
public:
map<T,int> forw;
map<int,T> rev;
int curr;
//typeof(forw)::iterator temp;
map<T,int>::iterator forwit;
map<int,T>::iterator revit;
};
// }; // JVC: This was present, but unmatched.
i have completely no idea what the problem is? please help.
thanks in advance
To help the compiler understand you are talking about a type in a templated context, you have to help it writing
typename.In your case