网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  遍历std:vector和std:地图

遍历std:vector和std:地图

分类: IT文章 • 2024-08-17 08:33:49
遍历std::vector和std::map
//遍历vector 
for (auto iter = vector.begin() ; iter != vector.end() ; iter++ ){
  *iter
}

//遍历map
for(auto it = map.begin(); it != map.end(); ++it) {
     auto key = it->first;
     auto value = it->second;
}

 

相关推荐

  • std::vector遍历
  • C++ error C2440: “类型转换” : 无法从“std::vector::iterator”转换为“
  • 【转】VC中的class“std::vector<_Ty>”需要有 dll 接口由 class“Test”的客户端使用错误
  • 【转载】编写简单的消息发布器和订阅器 创建功能包topic_example时,显式的指明依赖roscpp和std_msgs, 依赖会被默认写到功能包的CMakeLists.txt和package.xml中
  • std 地图的析构函数崩溃了,如何调试
  • std::map 遍历
  • [C/C++标准库]_[初级]_[std:vector的多线程读写有关问题]
  • std vector
  • std::vector
  • Item 21: 较之直接使用new优先使用std:make_unique和std:make_shared
  • 小结shareSDK分享到各平台需注意
  • ListView兑现
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号