C System Calls and messages

☆樱花仙子☆ 提交于 2020-01-07 03:06:12

问题


I am trying to pass a pointer to a system call by passing a message with that call.

The pointer should be to an int[].

However the message definition expects a char pointer to be passed. How can I send an int pointer?

int pidarray[j];
m.m1_p1 = pidarray;

Is it possible to convert the pointer types?


回答1:


Is it possible to convert the pointer types?

Yes this is possible. e.g.:

(char*) intPointer


来源:https://stackoverflow.com/questions/34063927/c-system-calls-and-messages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!