我有一個函數調用這種方式:
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