More about Vector
来源:互联网 发布:网络监控摄像头ip地址 编辑:程序博客网 时间:2024/05/28 16:22
1. Vector Constructor
vector<int> myVector;vector<long> myVector(elementNo);vector<float> myVector(elementNo, value);
2. Accessing elements of a vector
//safe access version, check boundsmyVector.at(index);//unsafe access versionmyVector[index]; // not check bounds
myVictor.size(); //returns the number of elements in myVector;myVictor.capacity() //returns how much myVictor can hold;myVictor.max_size(); returns the maximum number of elements the container can hold. it determined by system.
4. Insert/Delete elements
myVector.push_back(const TYPE& val);//adding a single element to the end of a vector.myVector.pop_back(); //remove a single element from the end of a vector
0 0
- More about Vector
- about vector
- More about Comparator
- know more about sementic
- Something more about ClassLoader
- Know more about checkpoint
- more about AngularJS
- 【4】More About Triggers
- tell him more about myself
- More information about AOC Dungenons
- For more info about Neverfull
- Parallel && LED.....More about parallelport........
- Intro:More about loops work
- Chapter 5 - More About Variables
- Tell you more about Zend_Form
- Learn more about Web driver
- Chapter 6 More about Functions
- SQL Syntax - more about SQL
- iOS study Day22-storyboard 和xib的混搭
- 自增运算符重载
- Unity3D的断点调试功能
- NYOJ42-一笔画问题
- rest-work-eat-study-rest-work-eat or rest-rest-work-work-eat-eat..
- More about Vector
- 回文字符串的判定------非递归与递归实现(未完)
- 在UI中调用套打
- eas 关于ID
- eas 组织类型
- vim复制粘贴
- 把Excel隐藏处理
- 因为对工厂缴纳社保的标准不满
- UI调试利器——Reveal