我有地图 map < double, multimap < int, class * >> N;
地图<双,多重映射<INT,类*> =列表<class * > * L
typedef list <class *> classList;
classList *L;
我希望class *
从map <double, multimap < int, class*>>
去进入名单L;
map < double, multimap < int, class* > :: iterator Mit;
multimap < int, class* > :: iterator mmit;
for (Mit = N.begin(); Mit != N.end(); Mit++) {
for (mmit = Mit->second.begin(); mmit != Mit->second.end(); mmit++){
//HERE
}}
这将编译并运行。但是我无法将这两个class *
设置成相等。 我得到的编译错误:
L.insert(mmit->second);
error: no matching function for call to 'std::list<Class *> :: insert (Class*&)'
如果我把L.insert(mmit->second);
其中//这里是我得到这个编译错误。
error: no matching function for call to 'std::list<Class *> :: insert (Class*&)
您需要显示您的完整源代码,以便能够尝试编译。 –
@FrancisCugler不是_full code_,而是[MCVE]。 –
@πάνταῥεῖ真;和适当的格式以方便阅读。 –