Vector 的学习

C++ 的数组运行时不能动态的改变数组的长度,但是 vector 可以

vector<int>    hellovector ,//是不是List<int>

hellovector.push_back(10),

hellovector.push_back(11),

获取vector里面的数据

for(int i=0;i<hellovector.size();i++)

{

  cout<<hellovector(i);
}

posted on 2012-10-30 10:05  GIS-MAN  阅读(183)  评论(0编辑  收藏  举报

导航