Hello, I'm trying to create a thread that takes an instance of the sf::Packet class as an argument, but everything is mixed up there.
sf::UdpSocket sock;
void server(sf::Packet pack, sf::Address addr, sf::Packet packet){
int a;
pack >> a;
std::cout<<a;
}
int main(){
sf::Address addr;
sf::Packet packet;
unsigned short port;
sock.bind(19132);
sock.receive(packet, addr, port);
std::thread thr(server, packet, addr, port);
thr.detach();
}