This pointer is declared inside an object Client.
client_list.push_back(Client("", false));
Every time I pass an object or the full list I do it as a reference. At least I think I do.
I only use that pointer to send and receive messages, like so:
Socket->send(buffer, x + 1);
And as a argument to selector functions:
selector.isReady(*client_list[i].S.Socket))
EDIT: I don't really know what the problem is, but it has something to do with vector push_back() and erase()
I tried to comment those lines and the program compiles without errors
EDIT2: I ended up changing my vector to store unique pointers to Clients instead of the clients themselves. Everything working as intended... for now. Thanks a lot guys, I REALLY appreciate your help.