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

零售网站开发网站备案有什么风险

零售网站开发,网站备案有什么风险,建投五公司网站,无锡微信网站目录 1、set的使用​编辑 1、初始化 2、遍历 3、查找​编辑 4、插入​编辑 5、不支持修改与下标 2、map的使用 1、初始化​编辑 2、遍历 3、map的下标(重点) #include iostream #include vector #include set #include map #include…目录 1、set的使用​编辑 1、初始化 2、遍历 3、查找​编辑 4、插入​编辑 5、不支持修改与下标 2、map的使用 1、初始化​编辑 2、遍历 3、map的下标(重点) #include iostream #include vector #include set #include map #include utility #include stringusing std::cout; using std::endl; using std::vector; using std::set; using std::map; using std::pair; using std::string;void test() {/* vectorint vec; *//* vec.push_back(1); *///set的基本特征//1、元素是唯一的不能重复//2、默认情况下元素会按照从小到大的顺序进行排列//3、set的底层使用的是红黑树结构////初始化setint number2;setint number {1, 2, 5, 7, 9, 8, 5, 3, 2};//迭代器(看成是一个指针)//遍历setint::iterator it;for(it number.begin(); it ! number.end(); it){cout *it ;}cout endl;//auto可以让编译器自动推导变量的类型/* auto a 10; *//* auto s1 hello; *//* auto b;//error */for(auto elem : number){cout elem ;}cout endl;cout endl set的查找 endl;size_t cnt1 number.count(7);size_t cnt2 number.count(10);cout cnt1 cnt1 endl;cout cnt2 cnt2 endl;/* auto it2 number.find(3); */setint::iterator it2 number.find(3);if(it2 number.end())//迭代器判空{cout 该元素不存在 endl;}else{cout 该元素存在, *it2 *it2 endl;}cout endl set的插入操作 endl;pairsetint::iterator, bool ret number.insert(6);if(ret.second){cout 插入成功 : *ret.first endl;}else{cout 插入失败 endl;}for(auto elem : number){cout elem ;}cout endl;cout endl endl;vectorint vec {1, 4, 20, 10, 7, 0};number.insert(vec.begin(), vec.end());for(auto elem : number){cout elem ;}cout endl;/* cout endl endl; *///set不支持下标访问/* cout number[0] number[0] endl;//error */cout endl endl;it number.begin();it;it;cout *it *it endl;/* *it 100;//error,不能修改 */ }void test00() {pairint, string number {1, hello};cout number.first number.second endl; }void test2() {//map的特征//1、存放的是key-value类型也就是pair类型//key值是唯一的不能重复//2、默认情况下, 会按照key值进行升序排列//3、map底层使用的也是红黑树////初始化mapint, string number {pairint, string(1, hello),pairint, string(4, hello),pairint, string(2, world),{5, wangdao},{3, wuhan},{1, hello},};//遍历mapint, string::iterator it;for(it number.begin(); it ! number.end(); it){cout it-first it-second endl;}cout endl endl;for(auto elem : number){cout elem.first elem.second endl;}cout endl endl;cout endl map的查找 endl;size_t cnt1 number.count(3);size_t cnt2 number.count(7);cout cnt1 cnt1 endl;cout cnt2 cnt2 endl;/* auto it2 number.find(3); */mapint,string::iterator it2 number.find(3);if(it2 number.end())//迭代器判空{cout 该元素不存在 endl;}else{cout 该元素存在, *it2 it2-first it2-second endl;}cout endl map的插入操作 endl;pairmapint, string::iterator, bool ret number.insert(pairint, string(6, kiki));if(ret.second){cout 插入成功 : ret.first-first ret.first-second endl;}else{cout 插入失败 endl;}for(auto elem : number){cout elem.first elem.second endl;}cout endl endl;cout number[0] number[0] endl;//插入cout number[5] number[5] endl;//查找cout endl endl;for(auto elem : number){cout elem.first elem.second endl;}cout endl endl;number[0] zhongguo;//修改number[1] zhongguo;//修改for(auto elem : number){cout elem.first elem.second endl;}}int main(int argc, char **argv) {test2();return 0; } test的运行结果: 1 2 3 5 7 8 9 1 2 3 5 7 8 9set的查找 cnt1 1 cnt2 0 该元素存在, *it2 3set的插入操作 插入成功 : 6 1 2 3 5 6 7 8 90 1 2 3 4 5 6 7 8 9 10 20*it 2 test2的运行结果: 1 hello 2 world 3 wuhan 4 hello 5 wangdao1 hello 2 world 3 wuhan 4 hello 5 wangdaomap的查找 cnt1 1 cnt2 0 该元素存在, *it2 3 wuhanmap的插入操作 插入成功 : 6 kiki 1 hello 2 world 3 wuhan 4 hello 5 wangdao 6 kikinumber[0] number[5] wangdao0 1 hello 2 world 3 wuhan 4 hello 5 wangdao 6 kiki0 zhongguo 1 zhongguo 2 world 3 wuhan 4 hello 5 wangdao 6 kiki 1、set的使用 1、初始化 2、遍历 3、查找 4、插入 5、不支持修改与下标 2、map的使用 1、初始化 2、遍历 3、map的下标(重点)
http://www.zqtcl.cn/news/648434/

相关文章:

  • 河南网站域名备案莱芜新闻电视台节目表
  • 长春网站建设新格做天猫还是做网站推广
  • 新网站建设的感想安阳区号是什么
  • 余姚市城乡建设局网站wordpress 预览插件
  • 游戏开发和网站开发wordpress foreign trade
  • 网站设计 原型图html购物网站模板
  • 谷歌网站推广报价国产搜什么关键词最好看
  • 婚礼网站有哪些个人做网站需要什么条件
  • 深圳企业网站seo人才招聘网站建设
  • 谷歌下载seo是什么软件
  • 个人网站设计分析小程序在线制作平台
  • 网站开发 一般用什么语言vi视觉设计案例
  • 微信公众平台官方网官网seo优化找哪家做
  • 简约 网站模板网站目录链接怎么做
  • 国内地铁建设公司网站大连做网站外包
  • 微网站营销是什么网站图片上传代码
  • 外包公司做网站多少用vs做的网站怎么打开
  • 兴义城乡建设部网站企业服务器配置方案
  • 淘宝客网站根目录wordpress调用导航代码
  • 海外免费网站推广网站开发项目报告书
  • 大气的金融网站深圳专门做兼职的网站
  • 最新网站备案四平网站公司
  • 济宁恒德建设有限公司网站互联网营销师报名入口
  • 做灯饰的企业都会在哪些网站网站排名恢复
  • 互联网公司网站建设价格跨境支付互联互通
  • 杭州 高端网站 开发宜昌建设网站公司
  • 咋样做网站快照济南建设质量协会网站
  • 学校网站怎么建设兄弟网络(西安网站建设制作公司)
  • 长春市城乡建设局网站photoshop破解版下载免费中文版
  • 吕梁网站设计天津高端网页制作