<pre name="code" class="cpp">#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<string> svec = { "hello", "world", "river" };
if (!svec.empty()) {
cout << "front elem: " << svec.front() << '\n'
<< "back elem: " << svec.back() << endl;
}
return 0;
}