- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Array 容器的相关知识,array是一个顺序容器,和其他标准容器相比它的特点是容器的大小固定,顺序存储。
1: array的构造函数
array();
array(const array right);
2:array的成员变量
Type Definition Description array::const_iterator The type of a constant iterator for the controlled sequence. array::const_pointer The type of a constant pointer to an element. array::const_reference The type of a constant reference to an element. array::const_reverse_iterator The type of a constant reverse iterator for the controlled sequence. array::difference_type The type of a signed distance between two elements. array::iterator The type of an iterator for the controlled sequence. array::pointer The type of a pointer to an element. array::reference The type of a reference to an element. array::reverse_iterator The type of a reverse iterator for the controlled sequence. array::size_type The type of an unsigned distance between two elements. array::value_type The type of an element. 3:array的关于迭代器的成员函数
Iterators
begin Return iterator to beginning?(public member function )
end Return iterator to end?(public member function )
rbegin Return reverse iterator to reverse beginning?(public member function )
rend Return reverse iterator to reverse end?(public member function )
cbegin Return const_iterator to beginning?(public member function )
cend Return const_iterator to end?(public member function )
crbegin Return const_reverse_iterator to reverse beginning?(public member function )
crend Return const_reverse_iterator to reverse end?(public member function )
这些东西和list中迭代器都类似,在list篇中已经做过大量介绍,这里就不再啰嗦了。
4:array中关于容量的函数
Capacity
size Return size?(public member function )
max_size Return maximum size?(public member function )
empty Test whether array is empty?(public member function )
4.1 size()函数的用法,从结果中可以看出array容量的一些端倪来。
size_type size() const;
#include iostream
#include array
int main ()
{
std::arrayint,5 myints;
std::cout size of myints: myints.size() std::endl;
std::cout sizeof(myints): sizeof(myints) std::endl;
return
您可能关注的文档
最近下载
- 售后服务体系、流程及售后保障措施.docx VIP
- 北师版初中心理健康七年级全一册第一课翻开新的一页开启新学期课.pptx VIP
- 注塑生产排程月计划(ASDJS)自动排程.xls VIP
- QCT484-1999 汽车油漆涂层.pdf VIP
- 《影视后期合成》教案全套项目1--11 初识After Effects--渲染输出.docx VIP
- SAP物料分类账操作详解(S4系统).doc VIP
- 人教版小学数学四年级上册第六单元《用五入法试商的除法》PPT课件.pptx VIP
- 云南硅pu篮球场施工方案.docx VIP
- 学生牛奶糕点配送项目供货保障措施方案.docx VIP
- 课件中国现代文学史下.pptx VIP
文档评论(0)