c++ unordered_map

2023-05-16

#include <iostream>
#include <unordered_map>
 
int main()
{  
// simple comparison demo

    std::unordered_map<int , char> exp= {{1,'b'},{2,'c'},{3,'d'}};
    
    auto search = exp.find(2);
    if(search !=exp.end()){
      std::cout<<"find the value"<<std::endl;
    }else{
        std::cout<<"could not found the value!!!"<<std::endl;
    }
}

// About how to use unordered_map int cpp
// Try to make yourself more excellent...

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

c++ unordered_map 的相关文章

随机推荐