incompatible types when creating thread in Windows

前端 未结 1 888
无人共我
无人共我 2021-01-16 19:23

I have created an app in which I want a thread to handle listen-UDP separately and make me a buffer, but when I try to pass it to thread it says there are compatibility issu

相关标签:
1条回答
  • 2021-01-16 19:42

    Try below code that might help you..

    DWORD start(LPVOID lpdwThreadParam)
    {
        buffer_t *buffer = (buffer_t *)lpdwThreadParam; //Type cast your argument here
        SOCKET s;
        struct sockaddr_in server, si_other;
        int slen, recv_len;
        char buf[BUFLEN];
        WSADATA wsa;
        ...
    }
    
    0 讨论(0)
提交回复
热议问题