我有一张<条码>地图和带;图形、清单和带;int>“,我希望在名单上公布,并按数字打印。 我不断看到一个编辑错误,谈论的是召集人与召集人之间的转换。 我这样做有什么错误?
for (map<string, list<int> >::iterator it = words.begin(); it != words.end(); it++)
{
cout << it->first << ":";
for (list<int>::iterator lit = it->second.begin(); lit != it->second.end(); lit++)
cout << " " << intToStr(*lit);
cout << "
";
}
error: conversion from
‘std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::list<int, std::allocator<int> > > >’
to non-scalar type
‘std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::list<int, std::allocator<int> > > >’
requested|