как заполнить список через list?

#include <iostream>
#include <cstring>
#include <list>

using namespace std;

     typedef  struct Travelers
    {
        int ticket_code;
        char lastname[20];
        int numberofthings;
        int luggage_weight;
    };
int main()
{

    list<Travelers> lst;

    for (const auto& x : lst)
        cout << "ticket_code = " << x.ticket_code << endl
        << "lastname = " << x.lastname << endl
        << x.numberofthings << endl 
        << x.luggage_weight << endl<<endl;
    return 0;
}

Ответы (0 шт):