So i am initializing an iterator through a map like this:
std::map<K, V>::iterator it = m_map.find(begin);
And I am using a GCC(7.2.0) compiler that is giving me these errors:
1.prog.cc:187:9: error: need 'typename' before 'unit_test::std::map::iterator' because 'unit_test::std::map' is a dependent scope std::map::iterator it = m_map.find(begin); 2. prog.cc:187:34: error: expected ';' before 'it' std::map::iterator it = m_map.find(begin);
I didn't think that I was initializing it wrong, but i would appreciate if anyone can help and knows what I have to change.