去掉const属性,例: const double value = 0.0f; double* ptr = NULL;怎么才能让ptr指向value? 强制类型转换,去掉const属性,如ptr = <const_cast double *>(&value); 点击打开链接