Your philosopher number is an integer variable.
*(int*)(data) is to convert void * data into int* pointer first, and then take the value of the address pointed by int * (professional point is called de-reference).
Only in this way can we use integer data to fetch the memory pointed by void * pointer.