Possible Duplicate:
Where and why do I have to put the “template” and “typename” keywords?
Im using g++4.6 and I tried to template my class based on the char type used, but my variables arent only chars but also strings of those chars. So I tried something like this:
template<typename T>
class Node
//...
//constructor
Node(std::basic_string<T> str, std::basic_string<T>::iterator it)
{
}
//usage
Node<char16_t> start;
but I get
‘std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_Tp1> >::iterator’ is not a type
When I replace second T in the constructor arg list to be char16_t it compiles.