尊敬的技术支持:
您好,当定义一个函数例如fun(void* a) ,这个参数是任意类型的指针,这时候如果将一个int x = 0. 如果fun(&x)这样调用,函数运行没啥问题,但是编译器会给警告,警告int*类型和同void*不兼容的。怎么把这个警告关掉,谢谢。
祝您好心情!
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.
尊敬的技术支持:
您好,当定义一个函数例如fun(void* a) ,这个参数是任意类型的指针,这时候如果将一个int x = 0. 如果fun(&x)这样调用,函数运行没啥问题,但是编译器会给警告,警告int*类型和同void*不兼容的。怎么把这个警告关掉,谢谢。
祝您好心情!