小编tes*_*423的帖子

C为函数指针赋值int

我有一个存储在一个函数地址unsigned int和一个函数指针.

现在我想要function_pointer包含的价值 function_address

unsigned int function_address = 0xdeadbeef;
void(*function_pointer)(void) = function_address; // not valid
Run Code Online (Sandbox Code Playgroud)

如何在C中做到这一点?

c pointers integer

3
推荐指数
1
解决办法
62
查看次数

标签 统计

c ×1

integer ×1

pointers ×1