Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include <iostream> #include <list> using namespace std; int main() { list<string> cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Remove the first element cars.pop_front(); // Remove the last element cars.pop_back(); // Print list elements for (string car : cars) { cout << car << "\n"; } return 0; }
BMW
Ford