报错 Incompatible pointer types initializing ‘int *’ with an expression of type ‘float *’ float f; scanf("%f", &f); int *int_p = (int*)&f; 注意加上 (int*)