C++
This question already has an answer here:
Use typename
here:
typename vector<elemType>::const_iterator
Because const_iterator
is a dependent name (which is also shown in the error message). Search this site to know more about dependent-name.
Better use auto
and range-based for loop.
上一篇: 在模板类定义下定义内联函数
下一篇: C ++