摘要: struct val *v = (struct val *)arg;//传入的结构体指针强制转为实例化结构体*v struct val{ int num1; int num2; }; void *text3(void *arg) { struct val *v = (struct val *)arg 阅读全文
posted @ 2017-09-21 11:21 丁培飞 阅读(1254) 评论(0) 推荐(0) 编辑
摘要: #include<pthread.h> 2 #include<stdio.h> 3 4 struct val{ 5 int num1; 6 int num2; 7 }; 8 9 //send a int to arg 10 void *text(void *arg) 11 { 12 int *p = 阅读全文
posted @ 2017-09-21 11:15 丁培飞 阅读(1409) 评论(0) 推荐(0) 编辑