First of all: x converted to binary representation:
5.95 --> 01000000101111100110011001100110
then binary to int:
01000000101111100110011001100110 ---> 1086219904
c++ is more strongly typed.
you just need a cast:
p = (int*)&x;
this assumes int and float have the same size, which they may or may not. Most systems, they do.