包含字符串时的错误(在C ++中)

时间:2012-10-31 20:18:05

标签: c++ include compiler-errors

当我添加字符串库(#include <string>)时,编译时会出现大约100个错误。 Windows.h已经包含在内,所以我不知道问题是什么。

任何帮助都将不胜感激。

错误列在下面。

Error   105 error C1003: error count exceeds 100; stopping compilation  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   39  1   STablUpd
Error   99  error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   36  1   STablUpd
Error   101 error C2054: expected '(' to follow 'using' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   38  1   STablUpd
Error   5   error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    28  1   STablUpd
Error   8   error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    29  1   STablUpd
Error   12  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    30  1   STablUpd
Error   16  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    31  1   STablUpd
Error   20  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    32  1   STablUpd
Error   24  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    33  1   STablUpd
Error   28  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    34  1   STablUpd
Error   32  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    35  1   STablUpd
Error   35  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    37  1   STablUpd
Error   38  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    38  1   STablUpd
Error   42  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    39  1   STablUpd
Error   46  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    40  1   STablUpd
Error   50  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    41  1   STablUpd
Error   54  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    42  1   STablUpd
Error   58  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    43  1   STablUpd
Error   62  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    44  1   STablUpd
Error   65  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    46  1   STablUpd
Error   67  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    48  1   STablUpd
Error   70  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    49  1   STablUpd
Error   74  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    50  1   STablUpd
Error   78  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    51  1   STablUpd
Error   82  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    52  1   STablUpd
Error   86  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    53  1   STablUpd
Error   90  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    54  1   STablUpd
Error   94  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    55  1   STablUpd
Error   97  error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    57  1   STablUpd
Error   103 error C2059: syntax error : ';' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   39  1   STablUpd
Error   64  error C2061: syntax error : identifier 'abs'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    46  1   STablUpd
Error   66  error C2061: syntax error : identifier 'acos'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    48  1   STablUpd
Error   4   error C2061: syntax error : identifier 'acosf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    28  1   STablUpd
Error   34  error C2061: syntax error : identifier 'acosl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    37  1   STablUpd
Error   68  error C2061: syntax error : identifier 'asin'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    48  1   STablUpd
Error   6   error C2061: syntax error : identifier 'asinf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    28  1   STablUpd
Error   36  error C2061: syntax error : identifier 'asinl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    37  1   STablUpd
Error   69  error C2061: syntax error : identifier 'atan'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    49  1   STablUpd
Error   71  error C2061: syntax error : identifier 'atan2'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    49  1   STablUpd
Error   9   error C2061: syntax error : identifier 'atan2f' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    29  1   STablUpd
Error   39  error C2061: syntax error : identifier 'atan2l' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    38  1   STablUpd
Error   7   error C2061: syntax error : identifier 'atanf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    29  1   STablUpd
Error   37  error C2061: syntax error : identifier 'atanl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    38  1   STablUpd
Error   72  error C2061: syntax error : identifier 'ceil'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    49  1   STablUpd
Error   10  error C2061: syntax error : identifier 'ceilf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    29  1   STablUpd
Error   40  error C2061: syntax error : identifier 'ceill'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    38  1   STablUpd
Error   102 error C2061: syntax error : identifier 'clearerr'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   39  1   STablUpd
Error   73  error C2061: syntax error : identifier 'cos'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    50  1   STablUpd
Error   11  error C2061: syntax error : identifier 'cosf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    30  1   STablUpd
Error   75  error C2061: syntax error : identifier 'cosh'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    50  1   STablUpd
Error   13  error C2061: syntax error : identifier 'coshf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    30  1   STablUpd
Error   43  error C2061: syntax error : identifier 'coshl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    39  1   STablUpd
Error   41  error C2061: syntax error : identifier 'cosl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    39  1   STablUpd
Error   76  error C2061: syntax error : identifier 'exp'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    50  1   STablUpd
Error   14  error C2061: syntax error : identifier 'expf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    30  1   STablUpd
Error   44  error C2061: syntax error : identifier 'expl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    39  1   STablUpd
Error   77  error C2061: syntax error : identifier 'fabs'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    51  1   STablUpd
Error   15  error C2061: syntax error : identifier 'fabsf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    31  1   STablUpd
Error   45  error C2061: syntax error : identifier 'fabsl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    40  1   STablUpd
Error   104 error C2061: syntax error : identifier 'fclose' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   39  1   STablUpd
Error   79  error C2061: syntax error : identifier 'floor'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    51  1   STablUpd
Error   17  error C2061: syntax error : identifier 'floorf' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    31  1   STablUpd
Error   47  error C2061: syntax error : identifier 'floorl' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    40  1   STablUpd
Error   80  error C2061: syntax error : identifier 'fmod'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    51  1   STablUpd
Error   18  error C2061: syntax error : identifier 'fmodf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    31  1   STablUpd
Error   48  error C2061: syntax error : identifier 'fmodl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    40  1   STablUpd
Error   81  error C2061: syntax error : identifier 'frexp'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    52  1   STablUpd
Error   19  error C2061: syntax error : identifier 'frexpf' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    32  1   STablUpd
Error   49  error C2061: syntax error : identifier 'frexpl' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    41  1   STablUpd
Error   96  error C2061: syntax error : identifier 'hypot'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    57  1   STablUpd
Error   98  error C2061: syntax error : identifier 'hypotf' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    57  1   STablUpd
Error   83  error C2061: syntax error : identifier 'ldexp'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    52  1   STablUpd
Error   21  error C2061: syntax error : identifier 'ldexpf' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    32  1   STablUpd
Error   51  error C2061: syntax error : identifier 'ldexpl' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    41  1   STablUpd
Error   84  error C2061: syntax error : identifier 'log'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    52  1   STablUpd
Error   85  error C2061: syntax error : identifier 'log10'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    53  1   STablUpd
Error   23  error C2061: syntax error : identifier 'log10f' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    33  1   STablUpd
Error   53  error C2061: syntax error : identifier 'log10l' C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    42  1   STablUpd
Error   22  error C2061: syntax error : identifier 'logf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    32  1   STablUpd
Error   52  error C2061: syntax error : identifier 'logl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    41  1   STablUpd
Error   87  error C2061: syntax error : identifier 'modf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    53  1   STablUpd
Error   25  error C2061: syntax error : identifier 'modff'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    33  1   STablUpd
Error   55  error C2061: syntax error : identifier 'modfl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    42  1   STablUpd
Error   88  error C2061: syntax error : identifier 'pow'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    53  1   STablUpd
Error   26  error C2061: syntax error : identifier 'powf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    33  1   STablUpd
Error   56  error C2061: syntax error : identifier 'powl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    42  1   STablUpd
Error   89  error C2061: syntax error : identifier 'sin'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    54  1   STablUpd
Error   27  error C2061: syntax error : identifier 'sinf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    34  1   STablUpd
Error   91  error C2061: syntax error : identifier 'sinh'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    54  1   STablUpd
Error   29  error C2061: syntax error : identifier 'sinhf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    34  1   STablUpd
Error   59  error C2061: syntax error : identifier 'sinhl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    43  1   STablUpd
Error   57  error C2061: syntax error : identifier 'sinl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    43  1   STablUpd
Error   92  error C2061: syntax error : identifier 'sqrt'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    54  1   STablUpd
Error   30  error C2061: syntax error : identifier 'sqrtf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    34  1   STablUpd
Error   60  error C2061: syntax error : identifier 'sqrtl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    43  1   STablUpd
Error   93  error C2061: syntax error : identifier 'tan'    C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    55  1   STablUpd
Error   31  error C2061: syntax error : identifier 'tanf'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    35  1   STablUpd
Error   95  error C2061: syntax error : identifier 'tanh'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    55  1   STablUpd
Error   33  error C2061: syntax error : identifier 'tanhf'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    35  1   STablUpd
Error   63  error C2061: syntax error : identifier 'tanhl'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    44  1   STablUpd
Error   61  error C2061: syntax error : identifier 'tanl'   C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cmath    44  1   STablUpd
Error   100 error C2061: syntax error : identifier 'using'  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\cstdio   38  1   STablUpd

1 个答案:

答案 0 :(得分:0)

对于仍在寻找此内容的任何人:

“解决方案是右键单击每个C代码,然后依次单击“属性”>“ C / C ++”>“高级”>“编译为”,然后选中“编译为C ++代码(/ TP)””

来源:stack overflow:)