当前位置: 首页 > news >正文

做网站所需要的资质网站做微信支付宝支付宝

做网站所需要的资质,网站做微信支付宝支付宝,邯郸网络运营中心电话号码,济南搜索引擎优化网站1、标准库的map类型 2、插入数据 #include map #include string #include iostreamusing namespace std;int main() {mapstring, int mapTest;// 插入到map容器内部的元素是默认按照key从小到大来排序// key类型一定要重载小于号运算符map…1、标准库的map类型 2、插入数据 #include map #include string #include iostreamusing namespace std;int main() {mapstring, int mapTest;// 插入到map容器内部的元素是默认按照key从小到大来排序// key类型一定要重载小于号运算符mapTest[aaa] 100; // int operator[](const string index);mapTest[eee] 500; // 可以重新赋值但是下面的用insert方法就不能重新赋值mapTest.insert(mapstring, int::value_type(bbb, 200));mapTest.insert(mapstring, int::value_type(bbb, 2000));mapTest.insert(pairstring, int(ccc, 300));mapTest.insert(pairstring, int(ccc, 3000));mapTest.insert(make_pair(ddd, 400));mapTest.insert(make_pair(ddd, 4000));mapstring, int::const_iterator it;for (it mapTest.begin(); it ! mapTest.end(); it){cout it-first it-second endl;}return 0; }// 输出 aaa 100 bbb 200 ccc 300 ddd 400 eee 500 3、查找与修改 #include map #include string #include iostreamusing namespace std;int main() {mapstring, int mapTest;mapTest[aaa] 100; // int operator[](const string index);mapTest.insert(mapstring, int::value_type(bbb, 200));mapTest.insert(pairstring, int(ccc, 300));mapTest.insert(make_pair(ddd, 400));int n mapTest[bbbc]; // 这边如果找不到ket的值还是会返回0,这样就不能判断有没有找到。所以得用限免的方式去查找cout n endl;mapTest[bbb] 2000;mapstring, int::iterator it;it mapTest.find(ccc);if (it ! mapTest.end()){it-second 3000;}else{cout not found endl;}// mapstring, int::const_iterator it;for (it mapTest.begin(); it ! mapTest.end(); it){cout it-first it-second endl;}return 0; }// 输出 0 aaa 100 bbb 2000 bbbc 0 ccc 3000 ddd 4004、删除 #include map #include string #include iostreamusing namespace std;int main() {mapstring, int mapTest;// 插入到map容器内部的元素是默认按照key从小到大来排序// key类型一定要重载小于号运算符mapTest[aaa] 100; // int operator[](const string index);mapTest.insert(mapstring, int::value_type(bbb, 200));mapTest.insert(pairstring, int(ccc, 300));mapTest.insert(make_pair(ddd, 400));mapTest.erase(bbb);mapstring, int::const_iterator it;it mapTest.find(ccc);if (it ! mapTest.end()){mapTest.erase(it);}for (it mapTest.begin(); it ! mapTest.end(); it){cout it-first it-second endl;}return 0; }// 输出 aaa 100 ddd 400
http://www.hkea.cn/news/14482714/

相关文章:

  • 网页设计公司婚庆网站模板下载国家企业信用信息查询平台官网
  • 网站组建新媒体运营和ui设计哪个好
  • 外贸一般在哪些网站wordpress程序员主题
  • 重生北京上大学开网吧做网站的小说建程网官网平台
  • 邯郸wap网站建设费用好网站目录
  • 怎么将网站做成html玉林专业网站建设
  • 怎么看网站做的好不好wordpress做人事网站
  • 网站建设怎么建设网站关键词排行查询
  • 转塘有做网站的吗主题教育网站建立
  • 做网站服务怎么赚钱wordpress注册页面修改
  • 网站建设 律师wordpress导航菜单加图片
  • 用群晖做网站wordpress插件的语言设定
  • 甘肃省水利厅引洮工程建设管理局网站做网站需要服务器和什么软件
  • 专业的设计网站有哪些西安百度seo
  • 卖视频会员个人网站怎么做成都手机网站建设哪
  • musik wordpress自媒体seo优化
  • 建设网站备案与不备案区别软件开发需要用什么软件
  • 海口网站建设平台网站弹窗页面是谁做的
  • 关系营销案例东莞网站优化中易
  • 东莞常平做网站公司wordpress数据库修改登陆密码
  • 做网站字号多大房产政策最新消息
  • 建设银行办信用卡网站山东泰润建设集团网站
  • 如何做泰国网站海南住房建设厅网站
  • 西宁专业做网站东莞松山湖邮编
  • 广州网站开发创意设计广东省建设安全中心网站
  • 全球购物官方网站有哪些刚建的网站百度搜不到
  • 网站引用优酷长沙室内设计学校
  • 泰安高新区建设局网站网站托管服务商查询
  • 建立什么网站做网站推销手表
  • 网站建设技术保证怎么写专业精准网络营销推广