C++char数组怎么转化为浮点数,比如字符串50.12怎么转化为double类型的浮点数

2024-11-23 09:27:34
推荐回答(1个)
回答1:

#include

std::stringstream ss;
ss << "50.12";
double val;
ss >> val;