set<unsigned int> setId;
vector<int> vecNode;
for (size_t i = 0,set<unsigned int>::iterator it = setId.begin(); i < vecNode.size() && it != setId.end(); i++,it++ ){}
编译器报告:错误:模板参数列表太少
但如果我这样写:
set<unsigned int> setId;
vector<int> vecNode;
size_t i = 0;
for (set<unsigned int>::iterator it = setId.begin(); i < vecNode.size() && it != setId.end(); i++,it++ ){}
编译成功。
所以为什么?