std :: string為float或double正試圖轉(zhuǎn)換std::string為float/double。我試過(guò)了:std::string num = "0.6";double temp = (double)atof(num.c_str());但它總是返回零。還有其他方法嗎?
std :: string為float或double
動(dòng)漫人物
2019-08-27 16:18:52