当前位置: 技术问答>linux和unix
Unix C高手有没。帮兄弟一把
来源: 互联网 发布时间:2015-06-25
本文导语: 我要把一个void * 结构传进去。 pthread_create(&tid,NULL, ThreadFn, (void *) struct) struct 偶自己定义得。呵呵 丫为啥出警告啊 Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*,...
我要把一个void * 结构传进去。
pthread_create(&tid,NULL, ThreadFn, (void *) struct)
struct 偶自己定义得。呵呵
丫为啥出警告啊
Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(*)(void*).
1 Error(s) and 1 Warning(s) detected.
这个warning咋弄掉。呵呵
man来man去找不到答案。有资料没?呵呵
pthread_create(&tid,NULL, ThreadFn, (void *) struct)
struct 偶自己定义得。呵呵
丫为啥出警告啊
Warning (Anachronism): Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(*)(void*).
1 Error(s) and 1 Warning(s) detected.
这个warning咋弄掉。呵呵
man来man去找不到答案。有资料没?呵呵
|
pthread_create(&tid,NULL, ThreadFn, (void *) &struct);
|
老哥
(void*)&struct
(void*)&struct
|
楼上几位都写啦,应该是结构体的地址!!!!