小编Dyl*_*lan的帖子

Visual Studio中的std文件内部错误

以下代码

#include <vector>

void main() {
std::vector<int> testing;
testing.push_back(45);
}
Run Code Online (Sandbox Code Playgroud)

在我构建之前就向我吐出一堆错误,奇怪的是,我的文件main.cpp没有任何错误,这些错误来自vector.h内部(以及我尝试使用的几乎所有其他std库) )。此代码在Mac上的xcode中工作正常,但在Windows上的Visual Studio 2015中则无法正常工作。我对Windows上的编码不太熟悉,所以我遗漏了一些明显的东西吗?

这是大多数错误的样子(有成百上千个这样的错误)

Error (active)      the global scope has no "float_t"   Test    c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath    688 
Error (active)      the global scope has no "double_t"  Test    c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath    688 
Error (active)      the global scope has no "nan"   Test    c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath    700 
Error (active)      the global scope has no "acoshf"    Test    c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath    704 
Error …
Run Code Online (Sandbox Code Playgroud)

c++ std visual-studio

1
推荐指数
1
解决办法
5163
查看次数

标签 统计

c++ ×1

std ×1

visual-studio ×1