Does anyone know why this causes a segmentation error?
int main ()
{
udp_client *client = new udp_client("192.168.160.128", 2500);
client->mysetsockopt("af");
client->askForFileAndID();
client->getFileSize();
//this line causes the seg fault error
std::thread t1(&udp_client::sendFiletoServer, client);
return 0;
}