Fre*_*uss 4 c casting void-pointers
我们正在开发有关嵌入式Linux与C和C++的项目.我最近在函数中遇到了一个奇怪的语句:
bool StrangeFunction(void* arg1, void* arg2, void* arg3)
{
(void)arg1;
(void)arg2;
(void)arg3;
unsigned long keycode = (unsigned long)arg2;
switch(keycode)
{
...
Run Code Online (Sandbox Code Playgroud)
我在上面的代码中有两个问题
(void)arg1;?unsigned long keycode = (unsigned long)arg2;如果您不介意,我需要一些解释和相关链接来解释主题.谢谢.