C ++:0和0.0之间的区别? [英] C++: difference between 0. and 0.0?

查看:226
本文介绍了C ++:0和0.0之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我深知 0 0.0 (int和double)之间的区别。

I am well aware of the difference between 0 and 0.0 (int and double).

但有什么区别 0 0.0 (请注意。)?

But is there any difference between 0. and 0.0 ( please note the . )?

感谢在前进,

阿克塞尔

推荐答案

有什么区别。两个文字是双。从C ++ - 语法:

There is no difference. Both literals are double. From the C++-Grammar:

fractional-constant:
    digit-sequenceopt . digit-sequence
    digit-sequence .

请参阅:超链接的C ++语法的BNF

这篇关于C ++:0和0.0之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆