why is this casting to void pointer valid?
问题 I'm debugging a program from a book. The program appears to work but I do not understand one line which I comment below. #include <pthread.h> #include <stdio.h> /* Compute successive prime numbers (very inefficiently). Return the Nth prime number, where N is the value pointed to by *ARG. */ void* compute_prime (void* arg) { int candidate = 2; int n = *((int*) arg); while (1) { int factor; int is_prime = 1; /* Test primality by successive division. */ for (factor = 2; factor < candidate; +