[英]Win32 Console Project issue
I created a Win32 Console project (disabled "precompiled header" option) with my VS2010. 我用VS2010创建了一个Win32 Console项目(禁用“预编译头”选项)。
Then I filled the code as below 然后我按如下所示填充代码
#include <stdio.h>
int main (void) {
double d = 0x0.3p10;
printf ("%.f\n", d);
return 0;
}
The compiler shows a syntax error on the line of double d = 0x0.3p10;
编译器在double d = 0x0.3p10;
的行上显示语法错误double d = 0x0.3p10;
. 。
: error C2059: syntax error : 'bad suffix on number'
: error C2143: syntax error : missing ';' before 'constant'
: error C2146: syntax error : missing ';' before identifier 'p10'
: error C2065: 'p10' : undeclared identifier
Is there something wrong on my project configuration? 我的项目配置有问题吗?
No. Microsoft Visual C++ doesn't support ISO C99. 否。MicrosoftVisual C ++不支持ISO C99。 Sorry. 抱歉。 There is no workaround except to use a different compiler. 除使用其他编译器外,没有其他解决方法。 See this question's accepted answer . 请参阅此问题的可接受答案 。
Alternatives: 备择方案:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.