Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 在输出的 7 个字符处双截断
C++ 为什么我以这种格式检索 double
1.4547e+08
如果我看到数据本身,它应该是
1.45470197.00
任何人都知道如何将双 1.4547e+08 转换回 1.45470197.00
如果您使用 打印数据,请std::cout使用std::fixed以防止科学记数法
std::cout
std::fixed
double d = 145470197.00; std::cout << std::fixed << d;