"楼层":未找到标识符

'floor': identifier not found

本文关键字:标识符 楼层      更新时间:2023-10-16

我的代码工作正常,直到编译时突然收到以下消息:

c:program files (x86)microsoft visual studio 12.0vcincludemath.h(700): error C3861: 'floor': identifier not found

我试图排除math.h,但我收到了相同的消息。 当我双击该消息时,它会将我带到使用 Function floor 的文件 math.h 的第 700 行。

然后,我做了一个空项目,只有一个文件,只包含:

#include <iostream>
int main()
{
}

我仍然收到这个错误。我是否不小心删除了某些内容?我怎么能理解它是什么?

对于 MSVS 来说,这是非常奇怪的行为。

1) 尝试创建空项目(没有预编译头)

2) 尝试更改

#include <math.h>

#include <cmath>

如果这没有帮助以及创建新的空项目,唯一的方法是确保您的PC上没有病毒并重新安装Visual Studio。