我有一个函数调用这种方式:
void foo(void *context) //function prototype
..
..
..
main()
{
.
.
foo(&(ptr->block)); //where ptr->block is of type integer.
.
.
.
void foo(void *context)
{
Here I try to use the ptr->block but am having problems. I have tried
if((int *)context ==1)
..
..
}
我类型转换它放回功能的int用它。我是否在foo()函数内解引用它错误?
真棒!感谢:-) – mane