這可能很簡單,但我已經清醒了太久。如何在int的地圖上使用find,字符串
所以我有一個地圖<整型,字符串>和我想要使用的功能找到
iter=mapInKey.find(int)->second;
if (iter != mapInKey.end())
{
outFileTxt << iter;
}
但我得到這個錯誤:no matching function for call to std::map<int, std::basic_string<char> >::find(std::string&)
所有我想要做的就是輸出的INT
find的參數不能是int,你不能使用second。 –