(vector&C++)(四、遍历与访问)
1.下标遍历 vector <string> vec(2); vec[0] = "123";vec[1] = "789"; for(int i = 0; i < vec.size(); i++){ cout << vec[i] <<endl; }结果:2.at遍历(相比于上面的方法,会检查是否越界) vector <stri...