Casting a void * to a double segmentation fault
Advertisements I found the following answer: Convert void* to double However, I am getting segmetation fault. Why is that? Code: void * p = (void *) 1234; double n = *(double *)p; >Solution : Pointer p is assigned to address 1234 that you chose at random?. You are then referencing a random address. It does… Read More Casting a void * to a double segmentation fault