【发布时间】:2015-11-21 11:25:41
【问题描述】:
我正在使用 VS V++ 2013。我的函数将向量作为参数并打印出类(我有抽象类和几个孩子)。除了印刷,我什么都做了。我有向量迭代器的问题。 每次我尝试编译时都会收到此错误 这是我的功能: 错误 1 错误 C3867: 'std::vector>::begin': 函数调用缺少参数列表;使用 '&std::vector>::begin' 创建指向成员的指针
void printList(const vector <Employee *> & Ve)
{
for (std::vector < Employee *>::iterator it = Ve.begin ;it != Ve.end(); ++it)
{
}
}
【问题讨论】:
标签: c++ vector iterator polymorphism