gpt4 book ai didi

c++ - Visual Studio 2015 中的 Iostream

转载 作者:行者123 更新时间:2023-11-30 03:50:05 25 4
gpt4 key购买 nike

我是初学者 c++ 程序员,最近升级到 Windows 10 并安装了新的 Visual Studio 2015。但是每当我使用 iostream

#include <iostream>

并尝试编译代码,它返回 289 错误。根据我的理解,cmath 和 math.h 与重新定义相冲突。这是我程序中的全部代码:

#include <iostream>
int main() {
return(0);
}

当它运行时,Visual Studio 2015 的输出是:

 1>------ Build started: Project: Test, Configuration: Debug x64 ------
1> main.cpp
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(33): error C2995: '_Ty _Pow_int(_Ty,int) throw()': function template has already been defined
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1013): note: see declaration of '_Pow_int'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(36): error C2084: function 'double abs(double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1025): note: see previous definition of 'abs'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(41): error C2084: function 'double pow(double,int) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1027): note: see previous definition of 'pow'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(46): error C2084: function 'float abs(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1029): note: see previous definition of 'abs'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(51): error C2084: function 'float acos(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1031): note: see previous definition of 'acos'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(56): error C2084: function 'float acosh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1033): note: see previous definition of 'acosh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(61): error C2084: function 'float asin(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1035): note: see previous definition of 'asin'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(66): error C2084: function 'float asinh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1037): note: see previous definition of 'asinh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(71): error C2084: function 'float atan(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1039): note: see previous definition of 'atan'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(76): error C2084: function 'float atanh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1041): note: see previous definition of 'atanh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(81): error C2084: function 'float atan2(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1043): note: see previous definition of 'atan2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(86): error C2084: function 'float cbrt(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1045): note: see previous definition of 'cbrt'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(91): error C2084: function 'float ceil(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1047): note: see previous definition of 'ceil'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(97): error C2084: function 'float copysign(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1049): note: see previous definition of 'copysign'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(102): error C2084: function 'float cos(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1051): note: see previous definition of 'cos'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(107): error C2084: function 'float cosh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1053): note: see previous definition of 'cosh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(112): error C2084: function 'float erf(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1055): note: see previous definition of 'erf'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(117): error C2084: function 'float erfc(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1057): note: see previous definition of 'erfc'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(122): error C2084: function 'float exp(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1059): note: see previous definition of 'exp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(127): error C2084: function 'float exp2(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1061): note: see previous definition of 'exp2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(132): error C2084: function 'float expm1(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1063): note: see previous definition of 'expm1'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(137): error C2084: function 'float fabs(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1065): note: see previous definition of 'fabs'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(142): error C2084: function 'float fdim(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1067): note: see previous definition of 'fdim'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(147): error C2084: function 'float floor(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1069): note: see previous definition of 'floor'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(153): error C2084: function 'float fma(float,float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1071): note: see previous definition of 'fma'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(158): error C2084: function 'float fmax(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1073): note: see previous definition of 'fmax'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(163): error C2084: function 'float fmin(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1075): note: see previous definition of 'fmin'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(168): error C2084: function 'float fmod(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1077): note: see previous definition of 'fmod'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(173): error C2084: function 'float frexp(float,int *) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1079): note: see previous definition of 'frexp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(178): error C2084: function 'float hypot(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1081): note: see previous definition of 'hypot'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(183): error C2084: function 'int ilogb(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1083): note: see previous definition of 'ilogb'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(188): error C2084: function 'float ldexp(float,int) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1085): note: see previous definition of 'ldexp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(193): error C2084: function 'float lgamma(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1087): note: see previous definition of 'lgamma'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(198): error C2084: function '__int64 llrint(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1089): note: see previous definition of 'llrint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(203): error C2084: function '__int64 llround(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1091): note: see previous definition of 'llround'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(208): error C2084: function 'float log(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1093): note: see previous definition of 'log'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(213): error C2084: function 'float log10(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1095): note: see previous definition of 'log10'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(218): error C2084: function 'float log1p(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1097): note: see previous definition of 'log1p'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(223): error C2084: function 'float log2(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1099): note: see previous definition of 'log2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(228): error C2084: function 'float logb(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1101): note: see previous definition of 'logb'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(233): error C2084: function 'long lrint(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1103): note: see previous definition of 'lrint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(238): error C2084: function 'long lround(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1105): note: see previous definition of 'lround'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(243): error C2084: function 'float modf(float,float *) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1107): note: see previous definition of 'modf'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(248): error C2084: function 'float nearbyint(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1109): note: see previous definition of 'nearbyint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(253): error C2084: function 'float nextafter(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1111): note: see previous definition of 'nextafter'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(259): error C2084: function 'float nexttoward(float,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1113): note: see previous definition of 'nexttoward'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(265): error C2084: function 'float pow(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1115): note: see previous definition of 'pow'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(270): error C2084: function 'float pow(float,int) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1117): note: see previous definition of 'pow'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(275): error C2084: function 'float remainder(float,float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1119): note: see previous definition of 'remainder'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(281): error C2084: function 'float remquo(float,float,int *) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1121): note: see previous definition of 'remquo'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(286): error C2084: function 'float rint(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1123): note: see previous definition of 'rint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(291): error C2084: function 'float round(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1125): note: see previous definition of 'round'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(296): error C2084: function 'float scalbln(float,long) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1127): note: see previous definition of 'scalbln'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(301): error C2084: function 'float scalbn(float,int) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1129): note: see previous definition of 'scalbn'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(306): error C2084: function 'float sin(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1131): note: see previous definition of 'sin'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(311): error C2084: function 'float sinh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1133): note: see previous definition of 'sinh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(316): error C2084: function 'float sqrt(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1135): note: see previous definition of 'sqrt'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(321): error C2084: function 'float tan(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1137): note: see previous definition of 'tan'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(326): error C2084: function 'float tanh(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1139): note: see previous definition of 'tanh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(331): error C2084: function 'float tgamma(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1141): note: see previous definition of 'tgamma'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(336): error C2084: function 'float trunc(float) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1143): note: see previous definition of 'trunc'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(341): error C2084: function 'long double abs(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1145): note: see previous definition of 'abs'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(346): error C2084: function 'long double acos(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1147): note: see previous definition of 'acos'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(351): error C2084: function 'long double acosh(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1149): note: see previous definition of 'acosh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(356): error C2084: function 'long double asin(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1151): note: see previous definition of 'asin'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(361): error C2084: function 'long double asinh(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1153): note: see previous definition of 'asinh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(366): error C2084: function 'long double atan(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1155): note: see previous definition of 'atan'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(371): error C2084: function 'long double atanh(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1157): note: see previous definition of 'atanh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(377): error C2084: function 'long double atan2(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1159): note: see previous definition of 'atan2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(382): error C2084: function 'long double cbrt(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1161): note: see previous definition of 'cbrt'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(387): error C2084: function 'long double ceil(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1163): note: see previous definition of 'ceil'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(393): error C2084: function 'long double copysign(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1165): note: see previous definition of 'copysign'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(398): error C2084: function 'long double cos(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1167): note: see previous definition of 'cos'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(403): error C2084: function 'long double cosh(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1169): note: see previous definition of 'cosh'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(408): error C2084: function 'long double erf(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1171): note: see previous definition of 'erf'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(413): error C2084: function 'long double erfc(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1173): note: see previous definition of 'erfc'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(418): error C2084: function 'long double exp(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1175): note: see previous definition of 'exp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(423): error C2084: function 'long double exp2(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1177): note: see previous definition of 'exp2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(428): error C2084: function 'long double expm1(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1179): note: see previous definition of 'expm1'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(433): error C2084: function 'long double fabs(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1181): note: see previous definition of 'fabs'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(439): error C2084: function 'long double fdim(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1183): note: see previous definition of 'fdim'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(444): error C2084: function 'long double floor(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1185): note: see previous definition of 'floor'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(450): error C2084: function 'long double fma(long double,long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1187): note: see previous definition of 'fma'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(456): error C2084: function 'long double fmax(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1189): note: see previous definition of 'fmax'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(462): error C2084: function 'long double fmin(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1191): note: see previous definition of 'fmin'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(468): error C2084: function 'long double fmod(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1193): note: see previous definition of 'fmod'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(474): error C2084: function 'long double frexp(long double,int *) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1195): note: see previous definition of 'frexp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(480): error C2084: function 'long double hypot(long double,long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1197): note: see previous definition of 'hypot'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(485): error C2084: function 'int ilogb(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1199): note: see previous definition of 'ilogb'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(491): error C2084: function 'long double ldexp(long double,int) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1201): note: see previous definition of 'ldexp'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(496): error C2084: function 'long double lgamma(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1203): note: see previous definition of 'lgamma'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(501): error C2084: function '__int64 llrint(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1205): note: see previous definition of 'llrint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(506): error C2084: function '__int64 llround(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1207): note: see previous definition of 'llround'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(511): error C2084: function 'long double log(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1209): note: see previous definition of 'log'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(516): error C2084: function 'long double log10(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1211): note: see previous definition of 'log10'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(521): error C2084: function 'long double log1p(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1213): note: see previous definition of 'log1p'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(526): error C2084: function 'long double log2(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1215): note: see previous definition of 'log2'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(531): error C2084: function 'long double logb(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1217): note: see previous definition of 'logb'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(536): error C2084: function 'long lrint(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1219): note: see previous definition of 'lrint'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(541): error C2084: function 'long lround(long double) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1221): note: see previous definition of 'lround'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(547): error C2084: function 'long double modf(long double,long double *) throw()' already has a body
1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\math.h(1223): note: see previous definition of 'modf'
1>c:\program files (x86)\microsoft visual studio 14.0\vc\include\cmath(547): fatal error C1003: error count exceeds 100; stopping compilation
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

如果有人对如何解决这个问题有建议,我将不胜感激。感谢您的帮助。

最佳答案

您的工具链已完全损坏。我建议删除然后重新安装 Visual Studio。

关于c++ - Visual Studio 2015 中的 Iostream,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32028265/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com