C++ 2017年VS中的标题cmath Intellisense错误
头cmath根本不起作用,当我在项目中打开cmath头文件时,VS Intellisense显示错误,如C++ 2017年VS中的标题cmath Intellisense错误,c++,visual-studio,C++,Visual Studio,头cmath根本不起作用,当我在项目中打开cmath头文件时,VS Intellisense显示错误,如全局范围没有“acosf”,并且有数百个 我读了很多文章,但还没弄明白。我已经根据一个线程确认了我正在使用sdk 10.0.15063.0,但它不起作用 包括cmath在内的任何项目都不起作用,因此它可能与特定代码无关。我已经尽力了,你们能告诉我怎么解决吗?提前谢谢 完整的错误列表如下所示: Severity Code Description
全局范围没有“acosf”
,并且有数百个
我读了很多文章,但还没弄明白。我已经根据一个线程确认了我正在使用sdk 10.0.15063.0,但它不起作用
包括cmath在内的任何项目都不起作用,因此它可能与特定代码无关。我已经尽力了,你们能告诉我怎么解决吗?提前谢谢
完整的错误列表如下所示:
Severity Code Description Project File Line Suppression State
Error (active) E0282 the global scope has no "acosf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 25
Error (active) E0282 the global scope has no "acoshf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 30
Error (active) E0282 the global scope has no "asinf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 35
Error (active) E0282 the global scope has no "asinhf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 40
Error (active) E0282 the global scope has no "atanf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 45
Error (active) E0282 the global scope has no "atanhf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 50
Error (active) E0282 the global scope has no "atan2f" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 55
Error (active) E0282 the global scope has no "cbrtf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 60
Error (active) E0282 the global scope has no "ceilf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 65
Error (active) E0282 the global scope has no "copysignf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 71
Error (active) E0282 the global scope has no "cosf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 76
Error (active) E0282 the global scope has no "coshf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 81
Error (active) E0282 the global scope has no "erff" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 86
Error (active) E0282 the global scope has no "erfcf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 91
Error (active) E0282 the global scope has no "expf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 96
Error (active) E0282 the global scope has no "exp2f" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 101
Error (active) E0282 the global scope has no "expm1f" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 106
Error (active) E0282 the global scope has no "fabsf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 111
Error (active) E0282 the global scope has no "fdimf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 116
Error (active) E0282 the global scope has no "floorf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 121
Error (active) E0282 the global scope has no "fmaf" Project7 c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include\cmath 127
//etc
///////////////////////////编辑:
这是包含CCMUX的标题,来自Strousrup的C++ PPP:
ifndef GRAPH_GUARD
#define GRAPH_GUARD 1
#include "Point.h"
#include <vector>
#include <string>
#include <cmath>
#include "fltk.h"
#include "std_lib_facilities.h"
namespace Graph_lib {
// defense against ill-behaved Linux macros:
#undef major
#undef minor
struct Color {
enum Color_type {
red=FL_RED, blue=FL_BLUE, green=FL_GREEN,
yellow=FL_YELLOW, white=FL_WHITE, black=FL_BLACK,
magenta=FL_MAGENTA, cyan=FL_CYAN, dark_red=FL_DARK_RED,
dark_green=FL_DARK_GREEN, dark_yellow=FL_DARK_YELLOW, dark_blue=FL_DARK_BLUE
//etc
“std_lib_facilities.h”中的尖晶石:
#定义(静默)索引(散列)弃用(警告1)
#ifndef H112
#定义H112 201004L
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
#包括
//等------------------
谢谢各位,我已经解决了这个问题。这是因为不同的<代码>数学冲突。H.<代码> >在包含目录> 中,你编译为C还是C++,它们是不同的语言。您应该展示一个导致问题的代码示例。看起来应该很短。包括,main,可能还有几行代码。非常感谢,我已经在上面添加了包含cmath的标题,希望这会有所帮助,但是当我打开一个新项目时,它也会显示相同的错误。它应该是编译c++“VS Intellisense显示错误”-它是Intellisense,代码可以编译吗?我不能复制/粘贴代码,所以我不能告诉你它是否适合我。如果你使用C++,你应该删除C标签。他们是不同的语言。
using namespace std is included in "std_lib_facilities.h".
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 1
#ifndef H112
#define H112 201004L
#include<iostream>
#include<fstream>
#include<sstream>
#include<cmath>
#include<cstdlib>
#include<string>
#include<list>
#include<vector>
#include<algorithm>
#include<stdexcept>
//etc------------------