#include <iostream>
#include <vector>
#include <string>
using namespace std;
int main()
{
vector<string> svec{"hello", "world", "river"};
for (auto word : svec)
cout << word << endl;
cout << "-------------------" << endl;
for (auto it = svec.begin(); it != svec.end(); ++it)
cout << *it << endl;
return 0;
}
list initializating vector
最新推荐文章于 2023-03-02 20:06:46 发布