This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

函数参数类型是void,当赋值为具体类型的时候就会警告,这个如何避免



尊敬的技术支持:

您好,当定义一个函数例如fun(void* a)  ,这个参数是任意类型的指针,这时候如果将一个int x = 0.    如果fun(&x)这样调用,函数运行没啥问题,但是编译器会给警告,警告int*类型和同void*不兼容的。怎么把这个警告关掉,谢谢。

祝您好心情!