摘要
动态数组vector容器在日常程序设计课程中没有涉及,而在ACM/ICPC竞赛中却经常被用到,因此有必要予以介绍。文章从创建一个vector对象,在vector对象中插入元素,在vector对象中删除元素,修改vector对象中元素的值,vector容器的常用成员函数和算法等方面详细地介绍了vector容器的使用。学生通过学习,能对vector容器有一个全面的认识,为其参加ACM/ICPC竞赛提供帮助。
The dynamic array vector container is not involved in the daily programming course,but is often used in the ACM/ICPC competitions,so it is necessary to be introduced.In this paper,the use of the vector container is introduced in detail,such as creating a vector object,inserting elements in the vector object,deleting elements in the vector object,modifying the value of the elements in the vector object,the common member functions and algorithms of the vector container.Through learning,students can have a comprehensive understanding of the vector container,it's helpful for them to participate in the ACM/ICPC competition.
作者
赵磊
魏书堤
陈坚祯
陈琼
姚丽君
Zhao Lei;Wei Shudi;Chen Jianzhen;Chen Qiong;Yao Lijun(Computer department of Hengyang Normal University,Hengyang,Hunan 421001,China)
出处
《计算机时代》
2018年第8期64-66,共3页
Computer Era
基金
衡阳师范学院教学改革研究项目(JYKT201605)