-2
任何想法爲什麼會產生編譯錯誤?從未解析的重載函數類型轉換C++ lambda錯誤
std::unordered_map<int,int> mymap;
std::for_each(mymap.begin, mymap.end(), [](std::unordered_map<int, int>::value_type mapval) {
std::cout << mapval.first << ",";
});
error: conversion from â<unresolved overloaded function type>â to non-scalar type âstd::_Rb_tree_iterator<std::pair<const int, int> >â requested
當他們回答問題時接受答案。 – Yakk 2012-12-29 17:21:00