请大家帮我看一下,创建线程,问题出在哪里
基本不懂,依胡芦画瓢,还是弄不对,郁闷呀
int Tcp_Echo(SOCKET,struct sockaddr_in);//定义
主函数中代码
SOCKET sockConn=accept(sockSrv,(SOCKADDR*)&addrClient,&len);
if (_beginthread(Tcp_Echo, BUFLEN, (void*)sockConn)<0) //报错地方
{
printf("creat new thread error\n");
return;
}
错误是:error C2664: '_beginthread' : cannot convert parameter 1 from 'int (unsigned int,struct sockaddr_in)' to 'void (__cdecl *)(void *)'
None of the functions with this name in scope match the target type
全部代码在
http://www.namipan.com/d/e0c48a329b97e7f94cc47b6b81d2248d4c82f2ad45040000