1智能感知:预期a ') c:\程序文件(x86)\微软visual studio 10.0\vc\包括\crtdefs。h 551 13 - Visual Studio错误。

时间:2021-12-24 03:13:17

I am trying to build a solution and I am getting the following error.

我正在尝试构建一个解决方案,我得到了以下错误。

IntelliSense: expected a ')' in crtdefs.h in the following line:

智能感知:在crtdefs中预期a ')。h在下面一行:

__declspec (__nothrow) void test();

There is an error line in "__nothrow". I am trying to run C code in C++..

在“__nothrow”中有一个错误行。我试着用c++运行C代码。

Am I missing some Visual C++ directories?? It was working last time when I tried to build solution.

我是否漏掉了一些Visual c++目录??这是我上次尝试构建解决方案时的工作。

1 个解决方案

#1


1  

In your error list window, do the following:

在错误列表窗口中,执行以下操作:

  1. Right click
  2. 右击
  3. Un-check show intellisense errors
  4. 取消勾选显示智能感知错误
  5. Solve other errors in your code and check if re-build succeeds
  6. 解决代码中的其他错误,并检查重新构建是否成功。

1智能感知:预期a ') c:\程序文件(x86)\微软visual studio 10.0\vc\包括\crtdefs。h 551 13 - Visual Studio错误。

If it succeeds, you can continue ignoring intellisense errors.

如果成功,您可以继续忽略智能感知错误。

  1. Sometimes it can be annoying to work with intellisense tell you that your code is wrong. You can also disable intellisense error reporting using:

    有时候,用智能感知告诉你你的代码是错误的,这是很烦人的。您还可以禁用智能感知错误报告使用:

    tools -> options -> text editor -> c/c++ -> Advanced -> Disable Error Reporting

    工具->选项->文本编辑-> - c/c++ ->先进->禁用错误报告。

1智能感知:预期a ') c:\程序文件(x86)\微软visual studio 10.0\vc\包括\crtdefs。h 551 13 - Visual Studio错误。

Change this to true and the errors will stop getting shown.

将其更改为true,错误将停止显示。

5) as you have specifically mentioned,

正如你所提到的,

I am trying to run C code in C++.

我试着用c++运行C代码。

In case you have headers like stdlib in your C code, change it to cstdlib in C++.

如果您的C代码中有像stdlib这样的头文件,请将其更改为c++中的cstdlib。

Look for other name changes that need to be done for header file names. Check out the seciton on deprecated header from the followign link: http://en.cppreference.com/w/cpp/header

查找需要为头文件名称进行的其他名称更改。从followign链接中查看已废弃标题的seciton: http://en.cppreference.com/w/cpp/header。

Please let me know what solved your problem afterwards. :)

请告诉我是什么解决了你的问题。:)

#1


1  

In your error list window, do the following:

在错误列表窗口中,执行以下操作:

  1. Right click
  2. 右击
  3. Un-check show intellisense errors
  4. 取消勾选显示智能感知错误
  5. Solve other errors in your code and check if re-build succeeds
  6. 解决代码中的其他错误,并检查重新构建是否成功。

1智能感知:预期a ') c:\程序文件(x86)\微软visual studio 10.0\vc\包括\crtdefs。h 551 13 - Visual Studio错误。

If it succeeds, you can continue ignoring intellisense errors.

如果成功,您可以继续忽略智能感知错误。

  1. Sometimes it can be annoying to work with intellisense tell you that your code is wrong. You can also disable intellisense error reporting using:

    有时候,用智能感知告诉你你的代码是错误的,这是很烦人的。您还可以禁用智能感知错误报告使用:

    tools -> options -> text editor -> c/c++ -> Advanced -> Disable Error Reporting

    工具->选项->文本编辑-> - c/c++ ->先进->禁用错误报告。

1智能感知:预期a ') c:\程序文件(x86)\微软visual studio 10.0\vc\包括\crtdefs。h 551 13 - Visual Studio错误。

Change this to true and the errors will stop getting shown.

将其更改为true,错误将停止显示。

5) as you have specifically mentioned,

正如你所提到的,

I am trying to run C code in C++.

我试着用c++运行C代码。

In case you have headers like stdlib in your C code, change it to cstdlib in C++.

如果您的C代码中有像stdlib这样的头文件,请将其更改为c++中的cstdlib。

Look for other name changes that need to be done for header file names. Check out the seciton on deprecated header from the followign link: http://en.cppreference.com/w/cpp/header

查找需要为头文件名称进行的其他名称更改。从followign链接中查看已废弃标题的seciton: http://en.cppreference.com/w/cpp/header。

Please let me know what solved your problem afterwards. :)

请告诉我是什么解决了你的问题。:)