标签: c++ c casting function-pointers void-pointers
可能重复: Casting a function pointer to another type
int primes[] = {11, 5, 3, 7, 19, 13, 2, 17}; int comp(const int*, const int*); qsort(primes, 8, sizeof(int), (int(*)(const void*, const void*))comp);
第三行的演员合法吗?或者必须comp取const void*个参数并在内部进行演员?
comp
const void*