如何删除'+'以科学模式输出
我有此代码:
std::cout << std::scientific << 1e9;
它输出1.0000E+09
,但我不想要+
。
我尝试使用std :: Showpos
,它对此无效。
我考虑过专门编写输出功能,但我宁愿找到一种更简单的方法。
I have this code:
std::cout << std::scientific << 1e9;
It outputs 1.000000e+09
but I don't want the +
.
I tried using std::showpos
, it doesn't work for that.
I thought about writing an output function specifically, but I'd prefer to find an easier way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论