c pthread passing array of type int

前端 未结 2 1678
后悔当初
后悔当初 2021-01-24 23:00

I am passing an array of type int pthread_create and getting error:

  histogram.c:138:3: warning: passing argument 3 of
 ‘pthread_create’ from incompatible   poi         


        
2条回答
  •  半阙折子戏
    2021-01-24 23:20

    The compilation error is because pthread_create expects void *output_results(void *bins), but you have int *bins.

    Also, the declaration of output_results you're using does not match its definition.

提交回复
热议问题