【发布时间】:2013-10-15 18:52:33
【问题描述】:
我正在传递一个 int pthread_create 类型的数组并收到错误:
histogram.c:138:3: warning: passing argument 3 of
‘pthread_create’ from incompatible pointer type [enabled by default]
expected ‘void * (*)(void *)’ but argument is of type ‘void * (*)(int *)’
void *output_results();
pthread_create(&t2, NULL, output_results, (void *)bins);
void *output_results(int *bins) {
some code
}
【问题讨论】: