I am writing a class for a priority vector, but I am facing trouble when I declare an iterator with <type> which is the typename of my class template. The error is in line 37.
error: need 'typename' before 'std::vector<type>::iterator' because 'std::vector<type>' is a dependent scope|
The error is pretty clear. You need to use typename to tell the compiler that vector<type>::iterator is a type, otherwise the compiler will assume it's a variable or function.