嗨,我收到以下警告,请帮助我。
passing argument 3 of ‘pthread_create’ from incompatible pointer type
我的代码是:
int function(int *);
int main()
{
pthread_t thread_a;
pthread_create(&thread_a,NULL, function,&connected);
int function(int *fnd)
{
int bytes_recieved;;
}
最佳答案
function
必须返回一个 void *
。有关详细信息,请参阅 pthread_create(3)
手册页。
关于c - 警告 :incompatible pointer type?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4321920/