运行c程序

时间:2017-12-29 05:28:48

标签: c visual-studio-code vscode-settings

我已经在我的64位窗口上安装了Minigw。我已经安装了VS代码作为代码编辑器。我已经完成了示例C程序来测试vs代码。 安装vs代码后,我安装了所有clang extensionsintelliSense extension

我的代码是: -

   #include <stdio.h>

    int main() {
    int a,b,c;

    printf("enter the no.");

    scanf("%d%d",&a,&b);

    c=a+b;
    printf("%d",c);

    return 0;
}

vs代码显示以下错误: -

1)Error请安装clang或检查配置clang.executable

2)检测到#include错误。请更新您的includePath。该翻译单元的智能感知功能(c:\ user \ h \ Desktop \ codetest.c)将由标签解析器提供。(1,1)

3)无法打开源文件“stdio.h”(1,1)

这个错误是什么意思?

1 个答案:

答案 0 :(得分:0)

根据vscode-github上的此链接,您需要执行以下步骤:

  1. 安装MinGW
  2. 的基本设置
  3. 修改了VSCode中的c_cpp_properties.json文件,如GitHub链接中所示。
相关问题