    01: #include <string>
    02: #include <list>
    03: #include <iostream>
    04:
    05: using namespace std;
    06:
    07: int main()
    08: {
    09:    list<string> staff;
    10:
    11:    staff.push_back("Cracker, Carl");
    12:    staff.push_back("Hacker, Harry");
    13:    staff.push_back("Lam, Larry");
    14:    staff.push_back("Sandman, Susan");
    15:
    16:    /* add a value in fourth place */
    17:
    18:    list<string>::iterator pos;
    19:    pos = staff.begin();
    20:    pos++;
    21:    pos++;
    22:    pos++;
    23:
    24:    staff.insert(pos, "Reindeer, Rudolf");
    25:
    26:    /* remove the value in second place */
    27:
    28:    pos = staff.begin();
    29:    pos++;
    30:
    31:    staff.erase(pos);
    32:
    33:    /* print all values */
    34:
    35:    for (pos = staff.begin(); pos != staff.end(); pos++)
    36:       cout << *pos << "\n";
    37:
    38:    return 0;
    39: }
    40: