get an iterator that points to the element you want to get rid of. Unfortunately list iterators are bidirectional: you can go to the start or the end of the list and move one single step foarward/backward at a time.
delete the object you point to (by the way, it would be safer to use smart pointers instead of raw pointers here: you could then skip this additional step and be sure that you're not leaking memory)
auto it = g_messages.begin(); // iterator to start at begin of list
it++;it++; // move two steps forward (i.e. 2x 1 step)
delete *it; // delete the allocated object you point to
g_messages.erase(it); // erase the elemnt in the list.