相关疑难解决方法(0)

为什么"0f"在C++中不被视为浮点字面值?

为什么0f在C++中不被视为浮点字面值?

#include <iostream>

using namespace std;

int main(){
  cout << 0f << endl;

  return 0;
}
Run Code Online (Sandbox Code Playgroud)

编译上面的内容给了我

C2509(语法错误:'数字上的错误后缀')

使用VS2008.

c++ floating-point syntax syntax-error notation

15
推荐指数
4
解决办法
5375
查看次数

标签 统计

c++ ×1

floating-point ×1

notation ×1

syntax ×1

syntax-error ×1