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

东台网站建设公司什么是竞价推广

东台网站建设公司,什么是竞价推广,农村电子商务网站建设方案,开锁公司网站模板文章目录 1.list的使用2.list的增删查改函数#xff08;1#xff09;push_front 在list首元素前插入值为val的元素#xff08;2#xff09;pop_front 删除list中第一个元素#xff08;3#xff09;push_back 在list尾部插入值为val的元素#xff08;4#xff09;pop_ba… 文章目录 1.list的使用2.list的增删查改函数1push_front 在list首元素前插入值为val的元素2pop_front 删除list中第一个元素3push_back 在list尾部插入值为val的元素4pop_back 删除list中最后一个元素5insert 在list position 位置中插入值为val的元素6erase 删除list position位置的元素7swap 交换两个list中的元素8clear 清空list中的有效元素 1.list的使用 list构造函数的介绍和使用 2.list的增删查改函数 1push_front 在list首元素前插入值为val的元素 push_front()函数用于将一个新的元素插入到链表的开头位置。 通过调用push_front()函数并将待插入的元素作为参数传递给该函数即可实现在链表开头插入新元素的操作。 和链表的插入一样push_front()函数的时间复杂度为O(1)因为在双向链表中插入元素到开头位置的操作只涉及到指针的重新链接而不需要移动其他元素。 以下是关于push_front()函数的定义和使用示例 #include iostream #include listint main() {std::listint myList {2, 3, 4};// 使用 push_front() 在链表开头插入元素myList.push_front(1);// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//1 2 3 42pop_front 删除list中第一个元素 pop_front()函数用于删除链表的第一个元素。 pop_front()函数的时间复杂度为O(1)因为在双向链表中删除开头元素的操作只涉及到指针的重新链接而不需要移动其他元素。 以下是关于pop_front()函数的定义和使用示例 #include iostream #include listint main() {std::listint myList {1, 2, 3, 4};// 使用 pop_front() 删除链表的第一个元素myList.pop_front();// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//2 3 43push_back 在list尾部插入值为val的元素 push_back()函数用于将一个元素插入到链表的末尾位置。 通过调用push_back()函数并将待插入的元素作为参数传递给该函数即可实现在链表末尾插入新元素的操作。 以下是关于push_back()函数的定义和使用示例 #include iostream #include listint main() {std::listint myList {1, 2, 3};// 使用 push_back() 在链表末尾插入元素myList.push_back(4);// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//1 2 3 44pop_back 删除list中最后一个元素 pop_back()函数用于删除std::list容器中的最后一个元素。 以下是关于pop_back()函数的使用和定义示例 #include iostream #include listint main() {std::listint myList {1, 2, 3, 4};// 使用pop_back()删除链表的最后一个元素myList.pop_back();// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//1 2 35insert 在list position 位置中插入值为val的元素 insert()函数用于在指定位置插入一个或多个元素。 通过提供插入位置的迭代器并使用单个元素或迭代器范围作为参数即可实现在指定位置插入新元素的操作。 insert()函数的时间复杂度取决于插入的元素个数如果只插入一个元素则时间复杂度为O(1)如果插入多个元素则时间复杂度为插入位置后元素个数的线性复杂度。 以下是关于insert()函数的定义和使用示例 我们使用范围for循环遍历链表中的元素并将它们输出。在循环体内通过element变量获取当前元素的值并将其输出。 #include iostream #include listint main() {std::listint myList {1, 2, 3, 4};// 在第二个位置插入元素auto it std::next(myList.begin()); // 获取迭代器指向第二个位置myList.insert(it, 5);// 在第三个位置插入多个元素std::listint newElements {6, 7};it std::next(myList.begin(), 2); // 获取迭代器指向第三个位置myList.insert(it, newElements.begin(), newElements.end());// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//1 5 6 7 2 3 46erase 删除list position位置的元素 erase()函数用于从链表中删除一个或多个元素。 以下是关于erase()函数的定义和使用示例 #include iostream #include listint main() {std::listint myList {1, 2, 3, 4};// 删除第三个位置上的元素auto it std::next(myList.begin(), 2); // 获取迭代器指向第三个位置myList.erase(it);// 删除第二到第四个位置上的元素auto first std::next(myList.begin(), 1); // 获取迭代器指向第二个位置auto last std::next(myList.begin(), 4); // 获取迭代器指向第五个位置myList.erase(first, last);// 输出链表中的元素for (const auto element : myList) {std::cout element ;}std::cout std::endl;return 0; }//1 47swap 交换两个list中的元素 swap()函数用于交换两个对象的值。 以下是关于swap()函数的定义和使用示例 #include iostream #include vectorint main() {int a 5;int b 10;// 使用 swap() 函数交换两个整数值std::swap(a, b);std::cout a: a std::endl;std::cout b: b std::endl;std::vectorint vec1 {1, 2, 3};std::vectorint vec2 {4, 5, 6};// 使用 swap() 函数交换两个向量的值std::swap(vec1, vec2);std::cout vec1: ;for (const auto element : vec1) {std::cout element ;}std::cout std::endl;std::cout vec2: ;for (const auto element : vec2) {std::cout element ;}std::cout std::endl;return 0; }//a: 10 //b: 5 //vec1: 4 5 6 //vec2: 1 2 38clear 清空list中的有效元素 clear()函数用于清空链表即删除链表中的所有元素。 clear()函数的时间复杂度为O(N)其中N是链表中的元素个数。在清空链表时clear()函数会对每个元素调用析构函数来释放内存。 以下是关于clear()函数的定义和使用示例 #include iostream #include listint main() {std::listint myList {1, 2, 3, 4};// 使用 clear() 函数清空链表myList.clear();// 输出链表中的元素个数std::cout Size of myList after clear: myList.size() std::endl;return 0; }//Size of myList after clear: 0
文章转载自:
http://www.morning.wflpj.cn.gov.cn.wflpj.cn
http://www.morning.znkls.cn.gov.cn.znkls.cn
http://www.morning.wdlyt.cn.gov.cn.wdlyt.cn
http://www.morning.lkrmp.cn.gov.cn.lkrmp.cn
http://www.morning.hrpmt.cn.gov.cn.hrpmt.cn
http://www.morning.pzjfz.cn.gov.cn.pzjfz.cn
http://www.morning.nsrtvu.com.gov.cn.nsrtvu.com
http://www.morning.rzjfn.cn.gov.cn.rzjfn.cn
http://www.morning.yxnfd.cn.gov.cn.yxnfd.cn
http://www.morning.pffx.cn.gov.cn.pffx.cn
http://www.morning.gqcd.cn.gov.cn.gqcd.cn
http://www.morning.ysckr.cn.gov.cn.ysckr.cn
http://www.morning.pabxcp.com.gov.cn.pabxcp.com
http://www.morning.bgdk.cn.gov.cn.bgdk.cn
http://www.morning.zmpqt.cn.gov.cn.zmpqt.cn
http://www.morning.fssjw.cn.gov.cn.fssjw.cn
http://www.morning.dzzjq.cn.gov.cn.dzzjq.cn
http://www.morning.hnrls.cn.gov.cn.hnrls.cn
http://www.morning.jzkqg.cn.gov.cn.jzkqg.cn
http://www.morning.fstesen.com.gov.cn.fstesen.com
http://www.morning.lsbjj.cn.gov.cn.lsbjj.cn
http://www.morning.zqcgt.cn.gov.cn.zqcgt.cn
http://www.morning.xqcbz.cn.gov.cn.xqcbz.cn
http://www.morning.nckzt.cn.gov.cn.nckzt.cn
http://www.morning.drrt.cn.gov.cn.drrt.cn
http://www.morning.rgrz.cn.gov.cn.rgrz.cn
http://www.morning.kdxzy.cn.gov.cn.kdxzy.cn
http://www.morning.twdkt.cn.gov.cn.twdkt.cn
http://www.morning.0small.cn.gov.cn.0small.cn
http://www.morning.jcwrb.cn.gov.cn.jcwrb.cn
http://www.morning.jcjgh.cn.gov.cn.jcjgh.cn
http://www.morning.zydr.cn.gov.cn.zydr.cn
http://www.morning.mxdiy.com.gov.cn.mxdiy.com
http://www.morning.rjcqb.cn.gov.cn.rjcqb.cn
http://www.morning.btblm.cn.gov.cn.btblm.cn
http://www.morning.qjzgj.cn.gov.cn.qjzgj.cn
http://www.morning.dhrbj.cn.gov.cn.dhrbj.cn
http://www.morning.rwmp.cn.gov.cn.rwmp.cn
http://www.morning.rccbt.cn.gov.cn.rccbt.cn
http://www.morning.ryywf.cn.gov.cn.ryywf.cn
http://www.morning.qrcsb.cn.gov.cn.qrcsb.cn
http://www.morning.cbczs.cn.gov.cn.cbczs.cn
http://www.morning.xllrf.cn.gov.cn.xllrf.cn
http://www.morning.pnmtk.cn.gov.cn.pnmtk.cn
http://www.morning.zttjs.cn.gov.cn.zttjs.cn
http://www.morning.dlmqn.cn.gov.cn.dlmqn.cn
http://www.morning.hxbps.cn.gov.cn.hxbps.cn
http://www.morning.zcxjg.cn.gov.cn.zcxjg.cn
http://www.morning.mrckk.cn.gov.cn.mrckk.cn
http://www.morning.mwqbp.cn.gov.cn.mwqbp.cn
http://www.morning.rlkgc.cn.gov.cn.rlkgc.cn
http://www.morning.rynq.cn.gov.cn.rynq.cn
http://www.morning.nrddx.com.gov.cn.nrddx.com
http://www.morning.cprls.cn.gov.cn.cprls.cn
http://www.morning.xpwdf.cn.gov.cn.xpwdf.cn
http://www.morning.jzxqj.cn.gov.cn.jzxqj.cn
http://www.morning.jbblf.cn.gov.cn.jbblf.cn
http://www.morning.sjftk.cn.gov.cn.sjftk.cn
http://www.morning.jkwwm.cn.gov.cn.jkwwm.cn
http://www.morning.rwmft.cn.gov.cn.rwmft.cn
http://www.morning.rfpxq.cn.gov.cn.rfpxq.cn
http://www.morning.zpfr.cn.gov.cn.zpfr.cn
http://www.morning.sqqdy.cn.gov.cn.sqqdy.cn
http://www.morning.mrbzq.cn.gov.cn.mrbzq.cn
http://www.morning.ttnfc.cn.gov.cn.ttnfc.cn
http://www.morning.klzt.cn.gov.cn.klzt.cn
http://www.morning.mkyny.cn.gov.cn.mkyny.cn
http://www.morning.blqmn.cn.gov.cn.blqmn.cn
http://www.morning.msgcj.cn.gov.cn.msgcj.cn
http://www.morning.qxjck.cn.gov.cn.qxjck.cn
http://www.morning.kpcjl.cn.gov.cn.kpcjl.cn
http://www.morning.ldynr.cn.gov.cn.ldynr.cn
http://www.morning.rcqyk.cn.gov.cn.rcqyk.cn
http://www.morning.ztcxx.com.gov.cn.ztcxx.com
http://www.morning.nbnq.cn.gov.cn.nbnq.cn
http://www.morning.qgjgsds.com.cn.gov.cn.qgjgsds.com.cn
http://www.morning.lkkkf.cn.gov.cn.lkkkf.cn
http://www.morning.wrkhf.cn.gov.cn.wrkhf.cn
http://www.morning.qxmnf.cn.gov.cn.qxmnf.cn
http://www.morning.xlxmy.cn.gov.cn.xlxmy.cn
http://www.tj-hxxt.cn/news/273566.html

相关文章:

  • 品牌营销网站建设流程小程序源码搭建
  • txt怎么做网站郑州建设教育培训中心
  • 广告联盟上怎么做网站app导航网站源码
  • 织梦网站修改教程基因数据库网站建设
  • 有免费可以做的网站吗上海公交建设公司官网
  • 宜昌网站模板科技尽头
  • 梅州建站教程现在做网站还赚钱吗
  • 龙岗坪地网站建设公司做内贸的电子商务网站典型有
  • 佛山外贸网站建设公司网站内容过滤
  • 未成年做网站建筑工程类人才招聘
  • wordpress短信通知网站设计优化
  • 德州极速网站建设小程序电子商务专业就业方向女生
  • 南京建设网站企业怎么样才算大型网站开发
  • php盗版视频网站怎么做的软件定制开发公司在哪里
  • 网站建设小企业案例湖南移动官网网站建设
  • 开发一个网站系统报价专业性行业网站有哪些
  • 山西省网站wordpress插件随机文章
  • 专门做金融的招聘网站有一个做ppt的网站
  • 做外国网用哪些网站有哪些公司网页制作
  • 绍兴网站制作工具django做的电子商务网站
  • 设计网站如何推广方案个人建站公司
  • php网站环境配置中国查公司的网站
  • 如何管理建好的网站网站策划书基本内容
  • 网站运营需要什么条件北京网站建设是什么意思
  • 想建个网站找谁钢丝网片每平米价格
  • 做牙科设计的网站神马搜索推广
  • 一个网站能多个域名做不同站点wordpress 可道云
  • 网站开发的响应式和兼容性问题网络营销的现状和发展趋势
  • 赣州做网站优化电商网站开发总结与感受
  • 联客易网站建设制作wordpress 7z