Vector 的学习 GIS

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);
}

原文地址:https://www.cnblogs.com/gisbeginner/p/2745844.html