unsigned double abc;对吗?

来源:百度知道 编辑:UC知道 时间:2024/05/11 12:50:07
有本C++的教程这样定义变量:
unsigned double abc;对吗?
是不是最新的ANSI标准支持上述语句?

在VC.NET上会有warning:
其MSDN上的解释:
A type modifier, whether it is signed or unsigned, cannot be used with a noninteger type. typemod is ignored.
The following sample generates C4076:
// C4076.cpp
// compile with: /W1 /LD
unsigned double x; // C4076

在G++上为error。

所以应该不是标准。