[讨论]C语言讨论
typedef struct _ccb
{
int temp;
void(*ptr);
}CCB;
char chen_buff[1000];
void pb_int_task_case1()
{
unsigned long i=10;
char j = 10;
CCB *Para1,*Para2;
Para1 = (CCB*)((char*)chen_buff + i);
Para2 = (CCB*)((char*)chen_buff + j);
Para1->temp = 0;
Para2->temp = 0;
Para1->ptr = pb_int_task_case2;
Para2->ptr = pb_int_task_case2;
printf("Function pointer test ok!\n");
return;
}
void pb_int_task_case2()
{
return;
}
大家讨论一下上面这段代码会有什么问题?