Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { list
cars = {"Volvo", "BMW", "Ford", "Mazda"}; // Change the value of the first element cars.front() = "Opel"; // Change the value of the last element cars.back() = "Toyota"; cout << cars.front() << "\n"; cout << cars.back() << "\n"; return 0; }
Opel
Toyota