同事用C语言写的代码(cmp_cpu_test.c),我在其基础上想加入C++的一些语法,因此需要用g++来编译,在编译时遇到问题:
背景:cmp_cpu_test.c用gcc能成功编译并执行,但是在用g++编译时报错。
问题1:error: invalid conversion from ‘void*’ to ‘void* (*)(void*)’ [-fpermissive]
[root@Thor acl]# g++ -o cmp_cpu_test.out cmp_cpu_test.c
cmp_cpu_test.c: In function ‘int main(int</